⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 procpancreaspathform.ascx.cs

📁 医疗决策支持系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
namespace Caisis.UI.Modules.All.DataEntryForms
{
	using System;
	using System.Data;
	using System.Data.SqlClient;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using System.Collections;
	using System.Collections.Specialized;

	using Caisis.Controller;
	using Caisis.DataAccess;
	using Caisis.BusinessObject;

	using System.Web.UI;

	using Caisis.UI.Core.Classes;
	using Caisis.UI.Core.Classes.CustomControls;

	/// <summary>
	///		Summary description for ProcPancreasPathForm.
	/// </summary>
	public abstract class ProcPancreasPathForm : DataEntryControlRelOne
	{
		protected HtmlInputHidden PathSummary;
		protected HtmlInputText PathNum;
		protected HtmlSelect PathSite;
		protected HtmlSelect PathSubSite;
		protected HtmlSelect PathStageSystem;
		protected HtmlSelect PathStageT;
		protected HtmlSelect PathPNI;
		protected HtmlSelect PathVascularInv;
		protected ComboBox Pathologist;
		protected HtmlTextArea PathNotes;
		protected HtmlSelect PathQuality;
		protected HtmlInputHidden SurgeryId;

		protected HtmlSelect PathHistology;
		protected HtmlSelect PathSecondaryHistology;
		protected HtmlSelect PathGrade;
		protected HtmlSelect PathExtraParenchymalInv;
		protected HtmlSelect PathPancreaticMargin;
		//Removed per Raquel: KR
		//protected HtmlSelect PathAnteriorMargin;
		protected HtmlSelect PathPosteriorMargin;
		protected HtmlSelect PathDuodenalMargin;
		protected HtmlSelect PathGastricMargin;
		protected HtmlSelect PathBileDuctMargin;
		protected HtmlSelect PathAnteriorPeritonealInv;
		protected HtmlSelect PathPancreatitis;
		protected HtmlSelect PathFibrosis;
		protected HtmlSelect PathDuodenum;
		protected HtmlSelect PathStomach;
		protected HtmlSelect PathPanIn;

		protected Repeater rptStages;
		protected HtmlAnchor StagingInfoLink;

		protected override void Page_Load(object sender, EventArgs e)
		{
			PageUtil.SetParentKey(SurgeryId);
			
			//populate look up and distinct value select boxes
			PageUtil.FillLkpDropDown(PathStageSystem, "StagingSystem", ViewState);

			SetStageSelects();

			PageUtil.FillLkpDropDown(PathPNI, "YesNoUnknown", ViewState);
			PageUtil.FillLkpDropDown(PathVascularInv, "YesNoUnknown", ViewState);
			PageUtil.FillLkpDropDown(PathQuality, "DataQuality", ViewState);
			PageUtil.FillLkpDropDown(PathSite, "PathFindSitePancreas", ViewState);
			PageUtil.FillLkpDropDown(PathSubSite, "PathFindSubSitePancreas", ViewState);

			PageUtil.FillLkpDropDown(PathHistology, "PathHistologyPancreas", ViewState);
			PageUtil.FillLkpDropDown(PathSecondaryHistology, "PathHistologyPancreas", ViewState);
			PageUtil.FillLkpDropDown(PathGrade, "PancreasGrade", ViewState);
			PageUtil.FillLkpDropDown(PathExtraParenchymalInv, "PancreasExtraParenchInv", ViewState);
			PageUtil.FillLkpDropDown(PathPancreaticMargin, "PancreasSurgMargins", ViewState);
			//PageUtil.FillLkpDropDown(PathAnteriorMargin, "PancreasSurgMarginsOther", ViewState);
			PageUtil.FillLkpDropDown(PathPosteriorMargin, "PancreasSurgMarginsOther", ViewState);
			PageUtil.FillLkpDropDown(PathDuodenalMargin, "PancreasSurgMarginsOther", ViewState);
			PageUtil.FillLkpDropDown(PathGastricMargin, "PancreasSurgMarginsOther", ViewState);
			PageUtil.FillLkpDropDown(PathBileDuctMargin, "PancreasSurgMarginsOther", ViewState);
			PageUtil.FillLkpDropDown(PathAnteriorPeritonealInv, "PancreasSurgMarginsOther", ViewState);
			PageUtil.FillLkpDropDown(PathPancreatitis, "PancreasPancreatitis", ViewState);
			PageUtil.FillLkpDropDown(PathFibrosis, "YesNoUnknown", ViewState);
			PageUtil.FillLkpDropDown(PathDuodenum, "Result", ViewState);
			PageUtil.FillLkpDropDown(PathStomach, "Result", ViewState);
			PageUtil.FillLkpDropDown(PathPanIn, "PancreasPanIN", ViewState);

			//create arrays that populate combo boxes
			Page.RegisterClientScriptBlock("Pathologist", PageUtil.FillComboDropDown(Pathologist.RefBy, "Pathologist"));
			
			//Check required fields
			Page.RegisterArrayDeclaration("requiredFieldArray","'"+PathHistology.UniqueID+"'");

			base.Page_Load (sender, e);
		}

		protected override object SaveViewState()
		{
			//add select and combo boxes to view state
			
			PageUtil.AddSelectToViewState(ViewState,PathStageSystem);
			PageUtil.AddSelectToViewState(ViewState,PathStageT);
			PageUtil.AddSelectToViewState(ViewState,PathPNI);
			PageUtil.AddSelectToViewState(ViewState,PathVascularInv);
			PageUtil.AddSelectToViewState(ViewState,PathSite);
			PageUtil.AddSelectToViewState(ViewState,PathSubSite);
			PageUtil.AddSelectToViewState(ViewState,PathQuality);

			PageUtil.AddSelectToViewState(ViewState, PathHistology);
			PageUtil.AddSelectToViewState(ViewState, PathSecondaryHistology);
			PageUtil.AddSelectToViewState(ViewState, PathGrade);
			PageUtil.AddSelectToViewState(ViewState, PathExtraParenchymalInv);
			PageUtil.AddSelectToViewState(ViewState, PathPancreaticMargin);
			//PageUtil.AddSelectToViewState(ViewState, PathAnteriorMargin);
			PageUtil.AddSelectToViewState(ViewState, PathPosteriorMargin);
			PageUtil.AddSelectToViewState(ViewState, PathDuodenalMargin);
			PageUtil.AddSelectToViewState(ViewState, PathGastricMargin);
			PageUtil.AddSelectToViewState(ViewState, PathBileDuctMargin);
			PageUtil.AddSelectToViewState(ViewState, PathAnteriorPeritonealInv);
			PageUtil.AddSelectToViewState(ViewState, PathPancreatitis);
			PageUtil.AddSelectToViewState(ViewState, PathFibrosis);
			PageUtil.AddSelectToViewState(ViewState, PathDuodenum);
			PageUtil.AddSelectToViewState(ViewState, PathStomach);
			PageUtil.AddSelectToViewState(ViewState, PathPanIn);
			
			
			return base.SaveViewState ();
		}

		public override HtmlInputHidden GetPrimKeyField()
		{
			return SurgeryId;
		}

		protected override DataEntryController GetController()
		{
			return new DataEntryController(new PancreasPathologyDa(), PancreasPathology.SurgeryId); //NOTE: fix args
		}

		protected override void SetDataEntryInfo()
		{
			this._tableInfo = "ProcPancreasPath";
			this._dataEntryTitle = "<a class=\"patientDataSectionTitle\"  href=\"DataEntryContainer.aspx?dataForm=SurgeriesForm&primKey="+Request.QueryString["parentKey"]+"\">Surgeries</a> > Pancreas Pathology";
		}

		protected override BizObject GetParams()
		{
			PancreasPathology biz = new PancreasPathology();
			DataRow dr = biz.Tables[PancreasPathology.Table_ProcPancreasPath].NewRow();

			if (!SurgeryId.Value.Equals(""))
			{
				dr[PancreasPathology.SurgeryId] = SurgeryId.Value;
			}

			//selects use: Request.Form[FieldName.UniqueID].ToString();
			//dates use: PageUtil.ObjToDateTime(FieldName.Value);
			//checkbox use: if(FieldName.Checked){dr[BizObject.FieldName] = 1;}
			//Patient ID should = this.patientID
			
			dr[PancreasPathology.PathNum] = PathNum.Value;
			dr[PancreasPathology.PathStageSystem] = Request.Form[PathStageSystem.UniqueID].ToString();
			if (Request.Form[PathStageT.UniqueID] != null && Request.Form[PathStageT.UniqueID].ToString() != "")
			{
				dr[PancreasPathology.PathStageT] = Request.Form[PathStageT.UniqueID].ToString();
			}
			
			dr[PancreasPathology.PathPNI] = Request.Form[PathPNI.UniqueID].ToString();
			dr[PancreasPathology.PathVascularInv] = Request.Form[PathVascularInv.UniqueID].ToString();
			dr[PancreasPathology.Pathologist] = Request.Form[Pathologist.UniqueID].ToString();
			dr[PancreasPathology.PathNotes] = PathNotes.Value;
			dr[PancreasPathology.PathSite] = Request.Form[PathSite.UniqueID].ToString();
			dr[PancreasPathology.PathSubSite] = Request.Form[PathSubSite.UniqueID].ToString();
			dr[PancreasPathology.PathQuality] = Request.Form[PathQuality.UniqueID].ToString();

			dr[PancreasPathology.PathHistology] = Request.Form[PathHistology.UniqueID].ToString();
			dr[PancreasPathology.PathSecondaryHistology] = Request.Form[PathSecondaryHistology.UniqueID].ToString();
			dr[PancreasPathology.PathGrade] = Request.Form[PathGrade.UniqueID].ToString();
			dr[PancreasPathology.PathExtraParenchymalInv] = Request.Form[PathExtraParenchymalInv.UniqueID].ToString();
			dr[PancreasPathology.PathPancreaticMargin] = Request.Form[PathPancreaticMargin.UniqueID].ToString();
			//dr[PancreasPathology.PathAnteriorMargin] = Request.Form[PathAnteriorMargin.UniqueID].ToString();
			dr[PancreasPathology.PathPosteriorMargin] = Request.Form[PathPosteriorMargin.UniqueID].ToString();
			dr[PancreasPathology.PathDuodenalMargin] = Request.Form[PathDuodenalMargin.UniqueID].ToString();
			dr[PancreasPathology.PathGastricMargin] = Request.Form[PathGastricMargin.UniqueID].ToString();
			dr[PancreasPathology.PathBileDuctMargin] = Request.Form[PathBileDuctMargin.UniqueID].ToString();
			dr[PancreasPathology.PathAnteriorPeritonealInv] = Request.Form[PathAnteriorPeritonealInv.UniqueID].ToString();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -