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

📄 encrectalexamsform.ascx.cs

📁 医疗决策支持系统
💻 CS
字号:
namespace Caisis.UI.Modules.Prostate.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 EncRectalExamsForm : DataEntryControlRelOne
	{

		protected HtmlSelect DRE_Result;
		protected HtmlInputText DRE_IndWidth;
		protected HtmlInputText DRE_IndLength;
		protected HtmlInputText DRE_ProsWeight;
		public HtmlInputHidden EncounterId;

		protected HyperLink EncRectalExamFindingsFormLink;

		protected override void OnInit(EventArgs e)
		{
			this._containsGrid=true;
			base.OnInit (e);
		}

		override protected void Page_Load(object sender, System.EventArgs e)
		{
			//set primaryKey equal to parentKey
			PageUtil.SetParentKey(EncounterId);

			//Hide lock. can only lock parent record //Lock button is hidden in DataEntryContainer
		
			
			//populate look up and distinct value select boxes
			
			// fix made 7/19/05 : added to 3.0 release
			PageUtil.FillLkpDropDown(DRE_Result, "RectalExamResult", this.Request.Form);
			//PageUtil.FillLkpDropDown(DRE_Result, "RectalExamResult", ViewState);

			//create arrays that populate combo boxes

			//required fields array
			Page.RegisterArrayDeclaration("requiredFieldArray","'"+DRE_Result.ClientID+"'");


			base.Page_Load(sender, e);
		}

		override protected object SaveViewState()
		{
			//add select and combo boxes to view state
			
			PageUtil.AddSelectToViewState(ViewState,DRE_Result);
			

			return base.SaveViewState();
		}

		override public HtmlInputHidden GetPrimKeyField()
		{
			return EncounterId;
		}

		//override protected DataEntryController GetController()
		//{
		//	return new DataEntryController(new EncRectalExamDa(), EncRectalExam.EncounterId); //NOTE: fix args
		//}

		override protected void SetDataEntryInfo()
		{
			this._tableInfo = "EncRectalExams";
			this._dataEntryTitle = "<a class=\"patientDataSectionTitle\"  href=\"DataEntryContainer.aspx?dataForm=EncountersForm&primKey="+Request.QueryString["parentKey"]+"\">Encounters</a> > Digital Rectal Exam";
		}

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

			if (!EncounterId.Value.Equals(""))
			{
				dr[EncRectalExam.EncounterId] = EncounterId.Value;
			}

			//below assignment only valid for text and textarea input.. need to modify for other form elements
			//selects use: Request.Form[FieldName.UniqueID].ToString();
			//dates use: PageUtil.ObjToDateTime(FieldName.Value);
			//checkbox use: if(SurgPending.Checked){dr[Surgery.SurgPending] = 1;}
			//Patient ID should = this.patientID
			
			 
			dr[EncRectalExam.DRE_Result] = Request.Form[DRE_Result.UniqueID].ToString();
			dr[EncRectalExam.DRE_IndWidth] = DRE_IndWidth.Value;
			dr[EncRectalExam.DRE_IndLength] = DRE_IndLength.Value;
			dr[EncRectalExam.DRE_ProsWeight] = DRE_ProsWeight.Value;

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

		}

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

			//below assignment good only for text and input fields, checkboxes, selects, radios need additional logic
			//selects use: PageUtil.SelectDropDownItem(fieldIdName, dr[Object.FieldName]);
			
			EncounterId.Value = dr[EncRectalExam.EncounterId].ToString();
			PageUtil.SelectDropDownItem(DRE_Result, dr[EncRectalExam.DRE_Result]);
			DRE_IndWidth.Value = dr[EncRectalExam.DRE_IndWidth].ToString();
			DRE_IndLength.Value = dr[EncRectalExam.DRE_IndLength].ToString();
			DRE_ProsWeight.Value = dr[EncRectalExam.DRE_ProsWeight].ToString();

			SetBaseFields(dr);

		}

	
	}
}

⌨️ 快捷键说明

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