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

📄 procorchiectomiesform.ascx.cs

📁 医疗决策支持系统
💻 CS
📖 第 1 页 / 共 2 页
字号:





		protected override void SetFields(BizObject bz)
		{
			Orchiectomy biz = (Orchiectomy)bz;
			DataRow dr = biz.Tables[Orchiectomy.Table_ProcOrchiectomies].Rows[0];

			//selects use: PageUtil.SelectDropDownItem(fieldIdName, dr[Object.FieldName]);
			
//			SurgeryId.Value = dr[Orchiectomy.SurgeryId].ToString();
			PageUtil.SelectDropDownItem(SurgeryId, dr[Procedure.SurgeryId]);


			ProcOrchiectomyId.Value = dr[Orchiectomy.ProcOrchiectomyId].ToString();
			//PageUtil.SelectDropDownItem(OpCPT_Code, dr[Orchiectomy.OpCPT_Code]);
			OpCPT_Code.Value = dr[Orchiectomy.OpCPT_Code].ToString();
			OpCPT_Description.Value = dr[Orchiectomy.OpCPT_Description].ToString();
			OpSurgeon.Value = dr[Orchiectomy.OpSurgeon].ToString();
			PageUtil.SelectDropDownItem(OpSurgeonType, dr[Orchiectomy.OpSurgeonType]);
			OpAssistant.Value = dr[Orchiectomy.OpAssistant].ToString();
			PageUtil.SelectDropDownItem(OpAssistantType, dr[Orchiectomy.OpAssistantType]);
			PageUtil.SelectDropDownItem(OpType, dr[Orchiectomy.OpType]);
			PageUtil.SelectDropDownItem(OpSide, dr[Orchiectomy.OpSide]);
			OpNotes.Value = dr[Orchiectomy.OpNotes].ToString();
			PathNum.Value = dr[Orchiectomy.PathNum].ToString();
			OrchDateText.Value = dr[Orchiectomy.OrchDateText].ToString();
			
			OrchDate.Value = PageUtil.ObjToDateString(dr[Orchiectomy.OrchDate]);
			PageUtil.SelectDropDownItem(PathExtension, dr[Orchiectomy.PathExtension]);
			PageUtil.SelectDropDownItem(PathGrade, dr[Orchiectomy.PathGrade]);
			PathHistology.Value = dr[Orchiectomy.PathHistology].ToString();
			PageUtil.SelectDropDownItem(PathStageSystem, dr[Orchiectomy.PathStageSystem]);

			PageUtil.SelectDropDownItem(PathVascularInv, dr[Orchiectomy.PathVascularInv]);
			PageUtil.SelectDropDownItem(PathSpermaticCordInv, dr[Orchiectomy.PathSpermaticCordInv]);
			PageUtil.SelectDropDownItem(PathScrotalInv, dr[Orchiectomy.PathScrotalInv]);
			PageUtil.SelectDropDownItem(PathEpididymisInv, dr[Orchiectomy.PathEpididymisInv]);
			PageUtil.SelectDropDownItem(PathReteTestisInv, dr[Orchiectomy.PathReteTestisInv]);
			PageUtil.SelectDropDownItem(PathTunicaAlbugineaInv, dr[Orchiectomy.PathTunicaAlbugineaInv]);
			PathCancerMaxDim.Value = dr[Orchiectomy.PathCancerMaxDim].ToString();
			PageUtil.SelectDropDownItem(PathITGCN, dr[Orchiectomy.PathITGCN]);
			PathOtherTestis.Value = dr[Orchiectomy.PathOtherTestis].ToString();
			//PageUtil.SelectDropDownItem(PathOtherTestis, dr[Orchiectomy.PathOtherTestis]);
			Pathologist.Value = dr[Orchiectomy.Pathologist].ToString();
			PathNotes.Value = dr[Orchiectomy.PathNotes].ToString();
			PathDataSource.Value = dr[Orchiectomy.PathDataSource].ToString();
			PageUtil.SelectDropDownItem(PathQuality, dr[Orchiectomy.PathQuality]);

			SetBaseFields(dr);

			SetStageSelects();
			PageUtil.SelectDropDownItem(PathStageT, dr[Orchiectomy.PathStageT]);
			PageUtil.SelectDropDownItem(PathStageSystem, dr[Orchiectomy.PathStageSystem]);



			if (dr[Orchiectomy.SurgeryId] != null && dr[Orchiectomy.SurgeryId].ToString().Length > 0)
			{
				setSurgeryDateJsVar.Text =  "<SCRIPT LANGUAGE=javascript>surgeryDateIsSet = true;</SCRIPT>";
			}


			//
			// this needs to be hit every time fields are set on this page
			// to refresh the link in the title
			SetDataEntryInfo();
			
		}



/*
		// enabling of staging fields is different
		override public void EnableFormFields()  
		{
			foreach(Control con in this.Controls)  
			{
				if (con is HtmlControl)  
				{
					if (con is HtmlInputControl || con is HtmlSelect || con is HtmlTextArea || con is HtmlInputText)  
					{
						if (!con.ID.Equals("PathStageT"))
						{
							((HtmlControl)con).Disabled = false;
						}
					}
					else if (con is HtmlImage) // added by jf for the calendar buttons
					{
						((HtmlControl)con).Attributes.Add("class", "pdFormFieldButtonOn");
						((HtmlControl)con).Disabled = false;
					}
				}
				else if (con is DataGrid)  
				{
					((DataGrid)con).Enabled = true;
				}
				else if (con is LinkButton)  
				{
					((LinkButton)con).Enabled = true;
				}
				else if (con is Caisis.UI.ComboBox)
				{
					((Caisis.UI.ComboBox)con).Disabled = false;
				}


				SetStageSelects();
			}
		}
*/

		override protected void SetStageSelects()
		{
			string selectedPathStageSystem;
			string trimSelectedPathStageSystem;

			if (Request.Form[PathStageSystem.UniqueID] != null && Request.Form[PathStageSystem.UniqueID] != "")
			{
				selectedPathStageSystem = Request.Form[PathStageSystem.UniqueID];
			}
			else
			{
				selectedPathStageSystem = PathStageSystem.Value;
			}
//			PageUtil.SelectDropDownItem(PathStageSystem, selectedPathStageSystem);	


			if (selectedPathStageSystem.StartsWith("UICC_").Equals(true))
			{
				trimSelectedPathStageSystem = selectedPathStageSystem.Remove(0, 4);
			}
			else
			{
				trimSelectedPathStageSystem = "_" + selectedPathStageSystem;
			}



			PageUtil.FillLkpDropDown(PathStageT, "TestisPathStageT" + trimSelectedPathStageSystem, ViewState);


/*
			if (PathStageSystem.Disabled.Equals(false) && selectedPathStageSystem != null && selectedPathStageSystem.Length > 0)
			{
				PathStageT.Disabled = false;
			}
			else
			{
				PathStageT.Disabled = true;
			}
*/


			if (PathStageSystem.Disabled.Equals(false))
			{
				PathStageT.Disabled = false;
			}
			else
			{
				PathStageT.Disabled = true;
			}



			string stageLkp = "TestisPathStageT" + trimSelectedPathStageSystem;
			ActivateStagingInfo(stageLkp);
		}



		protected void FillStagingInfo(string fieldName)
		{
			DataTable dt = PageUtil.RetrieveList(fieldName);


			if (dt.Rows.Count < 1)
			{
				DataRow blankRow = dt.NewRow();
				dt.Rows.Add(blankRow);
				dt.Rows[0]["LkpDescription"] = "You must select a staging system to view available options.";
			}
			else
			{
				rptStages.DataSource = dt.DefaultView;
				rptStages.DataBind();
			}
		}


		protected void ActivateStagingInfo(string stageLkp)
		{
			if (PathStageSystem.Disabled.Equals(false))
			{	
				if (PathStageT.Disabled.Equals(false))
				{
					FillStagingInfo(stageLkp);
					StagingInfoLink.Attributes.Add("style", "cursor: hand;");
					StagingInfoLink.Attributes.Add("onclick", "ShowStagingInfo();");
				}
				else
				{
					StagingInfoLink.Attributes.Add("onclick", "RequestStagingSystem();");
				}
			}

		}






		protected void StagingInfoDataBound(Object Sender, RepeaterItemEventArgs e) 
		{

			System.Web.UI.HtmlControls.HtmlAnchor tStageLink;
			tStageLink = (HtmlAnchor) e.Item.FindControl("tStageLink");


			if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 
			{

				int linkIndex = e.Item.ItemIndex + 1;
				tStageLink.Attributes.Add("onclick", "MM_showHideLayers('stagingInfoDiv','','hide'); setStageSelectValue('" + PathStageT.ClientID + "', " + linkIndex.ToString() + ");");
				//				tStageRadio.Name = "tStageRadio";
				//				tStageRadio.Value = e.Item.ItemIndex.ToString();
				


			}
		}




		// need to turn staging wizard off if cancel is uclicked
		override public void DisableFormFields()  
		{
			base.DisableFormFields();
			StagingInfoLink.Attributes.Clear();
		}

		override public void PopulateForm(BizObject bz)  
		{
			if (bz != null && bz.Tables[0].Rows.Count != 0)
			{
				base.PopulateForm(bz);
			}
			else
			{
				ResetFormFields();
			}

		}





		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		///		Required method for Designer support - do not modify
		///		the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.Load += new System.EventHandler(this.Page_Load);
		}
		#endregion
	}
}

⌨️ 快捷键说明

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