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

📄 procnodesform.ascx.cs

📁 医疗决策支持系统
💻 CS
字号:
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 Caisis.UI.Core.Classes;

	public abstract class ProcNodesForm : DataEntryControlRelOne
	{

		protected HtmlInputText NodeSubmitted;
		protected HtmlInputText NodeNumPackets;
		protected HtmlSelect NodeDissectionExtent;
		protected HtmlSelect NodeDissectionComplete;
		protected HtmlSelect NodeGrossResult;
		//protected HtmlInputText PathStageN;
		protected HtmlInputHidden ProcedureId;

		override protected void Page_Load(object sender, System.EventArgs e)
		{
			//set primaryKey equal to parentKey
			PageUtil.SetParentKey(ProcedureId);
			
			//Hide lock. can only lock parent record //Lock button is hidden in DataEntryContainer
			
			
			//populate look up and distinct value select boxes
			PageUtil.FillLkpDropDown(NodeDissectionExtent, "NodeDissectionExtent", ViewState);
			PageUtil.FillLkpDropDown(NodeDissectionComplete, "NodeDissectionComplete", ViewState);
//			PageUtil.FillLkpDropDown(PathStageN, "KidneyPathStageN", ViewState);
			PageUtil.FillLkpDropDown(NodeGrossResult, "NodeResult", ViewState);
			//PageUtil.FillLkpDropDown(NodeSubmitted, "DxNodeSubmitted", ViewState);
			
			
			//create arrays that populate combo boxes
			string reqFieldArray = PageUtil.CreateValidationScript("");
			Page.RegisterClientScriptBlock("requiredFieldArray", reqFieldArray);

			base.Page_Load(sender, e);
		}

		override protected object SaveViewState()
		{
			//add select and combo boxes to view state
			
			PageUtil.AddSelectToViewState(ViewState,NodeDissectionExtent);
			PageUtil.AddSelectToViewState(ViewState,NodeDissectionComplete);
			//PageUtil.AddSelectToViewState(ViewState,PathStageN);
			PageUtil.AddSelectToViewState(ViewState,NodeGrossResult);
			//Changed field to text box
			//PageUtil.AddSelectToViewState(ViewState,NodeSubmitted);

			return base.SaveViewState();
		}

		override public HtmlInputHidden GetPrimKeyField()
		{
			return ProcedureId;
		}

		override protected DataEntryController GetController()
		{
			return new DataEntryController(new NodeDa(), Node.ProcedureId); //NOTE: fix args
		}

		override protected void SetDataEntryInfo()
		{
			this._tableInfo = "ProcNodes";
			this._dataEntryTitle = "Nodes";
			this._dataEntryTitle = "<a href=\"DataEntryContainer.aspx?dataForm=ProceduresForm&primKey="+Request.QueryString["parentKey"]+"\"> Procedures</a> > Nodes";
		
		}

		override protected BizObject GetParams()
		{
			EmptyBizObject biz = new EmptyBizObject();
			Node dt = new Node();
			biz.Tables.Add(dt);
			DataRow dr = dt.NewRow();

			if (!ProcedureId.Value.Equals(""))
			{
				dr[Node.ProcedureId] = ProcedureId.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[Node.NodeSubmitted] = Request.Form[NodeSubmitted.UniqueID].ToString();
			dr[Node.NodeSubmitted] = NodeSubmitted.Value;
			dr[Node.NodeNumPackets] = NodeNumPackets.Value;
			dr[Node.NodeDissectionExtent] = Request.Form[NodeDissectionExtent.UniqueID].ToString();
			dr[Node.NodeDissectionComplete] = Request.Form[NodeDissectionComplete.UniqueID].ToString();
			dr[Node.NodeGrossResult] = Request.Form[NodeGrossResult.UniqueID].ToString();
		//	dr[Node.PathStageN] = Request.Form[PathStageN.UniqueID].ToString();

			AddBaseParams(dr);
			dt.Rows.Add(dr);
			biz.AcceptChanges();
			return biz;

		}

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

			//selects use: PageUtil.SelectDropDownItem(fieldIdName, dr[Object.FieldName]);
			
			ProcedureId.Value = dr[Node.ProcedureId].ToString();
			NodeNumPackets.Value = dr[Node.NodeNumPackets].ToString();
			PageUtil.SelectDropDownItem(NodeDissectionExtent, dr[Node.NodeDissectionExtent]);
			PageUtil.SelectDropDownItem(NodeDissectionComplete, dr[Node.NodeDissectionComplete]);

		//	PathStageN.Value = dr[Node.PathStageN].ToString();
//			PageUtil.SelectDropDownItem(PathStageN, dr[Node.PathStageN]);
			PageUtil.SelectDropDownItem(NodeGrossResult, dr[Node.NodeGrossResult]);
			//PageUtil.SelectDropDownItem(NodeSubmitted, dr[Node.NodeSubmitted]);
			NodeSubmitted.Value = dr[Node.NodeSubmitted].ToString();
			
			SetBaseFields(dr);
		}
	}
}

⌨️ 快捷键说明

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