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

📄 procrplndsform.ascx.cs

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

			PageUtil.SelectDropDownItem(PathStageSystem, dr[RPLND.PathStageSystem]);

			//PageUtil.SelectDropDownItem(PathExtension, dr[RPLND.PathExtension]);
			PathExtension.Value = dr[RPLND.PathExtension].ToString();
			PathHistology.Value = dr[RPLND.PathHistology].ToString();
			Pathologist.Value = dr[RPLND.Pathologist].ToString();
			PathNotes.Value = dr[RPLND.PathNotes].ToString();
			PathDataSource.Value = dr[RPLND.PathDataSource].ToString();
			PageUtil.SelectDropDownItem(PathQuality, dr[RPLND.PathQuality]);

			SetBaseFields(dr);
			SetStageSelects();
			PageUtil.SelectDropDownItem(PathStageGroup, dr[RPLND.PathStageGroup]);
			PageUtil.SelectDropDownItem(PathStageSystem, dr[RPLND.PathStageSystem]);
			PageUtil.SelectDropDownItem(PathStageN, dr[RPLND.PathStageN]);
			PageUtil.SelectDropDownItem(PathStageM, dr[RPLND.PathStageM]);

		}

/*
		// 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("PathStageGroup") || !con.ID.Equals("PathStageN") || !con.ID.Equals("PathStageM"))
						{
							((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;
			}
				


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


			PageUtil.FillLkpDropDown(PathStageGroup, "TestisPathStageGroup" + trimSelectedPathStageSystem, ViewState);
			PageUtil.FillLkpDropDown(PathStageN, "TestisPathStageN" + trimSelectedPathStageSystem, ViewState);
			PageUtil.FillLkpDropDown(PathStageM, "TestisPathStageM" + trimSelectedPathStageSystem, ViewState);



			// logic to turn off TM stages if Stage System not selected not working currently. leave on for now.
/*			if (PathStageSystem.Disabled.Equals(false) && selectedPathStageSystem != null && selectedPathStageSystem.Length > 0)
			{	
				PathStageGroup.Disabled = false;
				PathStageN.Disabled = false;
				PathStageM.Disabled = false;
			}
			else
			{
				PathStageGroup.Disabled = true;
				PathStageN.Disabled = true;
				PathStageM.Disabled = true;
			}
*/

			if (PathStageSystem.Disabled.Equals(false))
			{	
				PathStageGroup.Disabled = false;
				PathStageN.Disabled = false;
				PathStageM.Disabled = false;
			}
			else
			{
				PathStageGroup.Disabled = true;
				PathStageN.Disabled = true;
				PathStageM.Disabled = true;
			}



			ActivateStagingInfo(trimSelectedPathStageSystem);

		}


		protected void FillStagingInfo(string fieldName, Repeater rptStages)
		{
			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 StageSystemName)
		{
			if (PathStageSystem.Disabled.Equals(false))
			{

				if (PathStageN.Disabled.Equals(false))
				{

					FillStagingInfo("TestisPathStageN" + StageSystemName, rptNStages);
					FillStagingInfo("TestisPathStageM" + StageSystemName, rptMStages);
					NStagingInfoLink.Attributes.Add("style", "cursor: hand;");
					MStagingInfoLink.Attributes.Add("style", "cursor: hand;");
					NStagingInfoLink.Attributes.Add("onclick", "ShowSpecificStagingInfo('N');");
					MStagingInfoLink.Attributes.Add("onclick", "ShowSpecificStagingInfo('M');");

				}
				else
				{
					NStagingInfoLink.Attributes.Add("onclick", "RequestStagingSystem();");
					MStagingInfoLink.Attributes.Add("onclick", "RequestStagingSystem();");
				}

			}
		}



		protected void NStagingInfoDataBound(Object Sender, RepeaterItemEventArgs e) 
		{

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


			if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 
			{
				int linkIndex = e.Item.ItemIndex + 1;
				nStageLink.Attributes.Add("onclick", "MM_showHideLayers('NStagesDiv','','hide'); MM_showHideLayers('stagingInfoDiv','','hide'); setStageSelectValue('" + PathStageN.ClientID + "', " + linkIndex.ToString() + ");");
			}
		}


		protected void MStagingInfoDataBound(Object Sender, RepeaterItemEventArgs e) 
		{

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


			if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 
			{
				int linkIndex = e.Item.ItemIndex + 1;
				mStageLink.Attributes.Add("onclick", "MM_showHideLayers('MStagesDiv','','hide'); MM_showHideLayers('stagingInfoDiv','','hide'); setStageSelectValue('" + PathStageM.ClientID + "', " + linkIndex.ToString() + ");");
			}
		}


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

		}


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

		}

	}
}

⌨️ 快捷键说明

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