📄 procrplndsform.ascx.cs
字号:
namespace Caisis.UI.Modules.Testis.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;
public abstract class ProcRPLNDsForm : DataEntryControlRelOne
{
protected HtmlInputText OpCPT_Code;
protected HtmlInputText OpCPT_Description;
protected ComboBox OpSurgeon;
protected HtmlSelect OpSurgeonType;
protected ComboBox OpAssistant;
protected HtmlSelect OpAssistantType;
protected HtmlSelect OpType;
protected HtmlSelect OpIncisionType;
protected ComboBox OpDissectionExtent;
protected HtmlSelect OpNerveSparing;
protected HtmlSelect OpDesperation;
protected HtmlTextArea OpNotes;
protected HtmlInputText PathNum;
protected HtmlSelect PathStageGroup;
protected HtmlSelect PathStageSystem;
protected HtmlSelect PathStageN;
protected HtmlSelect PathStageM;
protected HtmlInputText PathExtension;
protected ComboBox PathHistology;
protected ComboBox Pathologist;
protected HtmlTextArea PathNotes;
protected ComboBox PathDataSource;
protected HtmlSelect PathQuality;
protected HtmlInputHidden SurgeryId;
protected HyperLink RPLND_PathFindingsFormLink;
protected Repeater rptNStages, rptMStages;
protected HtmlAnchor NStagingInfoLink, MStagingInfoLink;
override protected void Page_Load(object sender, System.EventArgs e)
{
//set parentKey if value is passed to page
PageUtil.SetParentKey(SurgeryId);
//populate look up and distinct value select boxes
//PageUtil.FillLkpDropDown(OpCPT_Code, "OpCPT_Code", ViewState);
PageUtil.FillLkpDropDown(OpSurgeonType, "OpSurgeonType", ViewState);
PageUtil.FillLkpDropDown(OpAssistantType, "OpSurgeonType", ViewState);
PageUtil.FillLkpDropDown(OpType, "OpTypeRPLND", ViewState);
PageUtil.FillLkpDropDown(OpIncisionType, "OpIncisionType", ViewState);
PageUtil.FillLkpDropDown(OpNerveSparing, "OpNerveSparing", ViewState);
PageUtil.FillLkpDropDown(OpDesperation, "YesNoUnknown", ViewState);
PageUtil.FillLkpDropDown(PathStageSystem, "StagingSystem", ViewState);
SetStageSelects();
// PageUtil.FillLkpDropDown(PathStageGroup, "TestisPathStageGroup", ViewState);
// PageUtil.FillLkpDropDown(PathStageN, "TestisPathStageN", ViewState);
// PageUtil.FillLkpDropDown(PathStageM, "TestisPathStageM", ViewState);
//PageUtil.FillLkpDropDown(PathExtension, "PathExtension", ViewState);
PageUtil.FillLkpDropDown(PathQuality, "dataQuality", ViewState);
//create arrays that populate combo boxes
Page.RegisterClientScriptBlock("OpSurgeon", PageUtil.FillComboDropDown(OpSurgeon.RefBy, "OpSurgeon"));
Page.RegisterClientScriptBlock("OpAssistant", PageUtil.FillComboDropDown(OpAssistant.RefBy, "OpSurgeon"));
Page.RegisterClientScriptBlock("PathHistology", PageUtil.FillComboDropDown(PathHistology.RefBy, "PathHistologyNodes"));
Page.RegisterClientScriptBlock("Pathologist", PageUtil.FillComboDropDown(Pathologist.RefBy, "Pathologist"));
Page.RegisterClientScriptBlock("OpDissectionExtent", PageUtil.FillComboDropDown(OpDissectionExtent.RefBy, "OpDissectionExtentRPLND"));
Page.RegisterClientScriptBlock("PathDataSource", PageUtil.FillComboDropDown(PathDataSource.RefBy, "DataSource"));
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,OpCPT_Code);
PageUtil.AddSelectToViewState(ViewState,OpSurgeonType);
PageUtil.AddSelectToViewState(ViewState,OpAssistantType);
PageUtil.AddSelectToViewState(ViewState,OpType);
PageUtil.AddSelectToViewState(ViewState,OpIncisionType);
PageUtil.AddSelectToViewState(ViewState,OpNerveSparing);
PageUtil.AddSelectToViewState(ViewState,OpDesperation);
PageUtil.AddSelectToViewState(ViewState,PathStageGroup);
PageUtil.AddSelectToViewState(ViewState,PathStageSystem);
PageUtil.AddSelectToViewState(ViewState,PathStageN);
PageUtil.AddSelectToViewState(ViewState,PathStageM);
//PageUtil.AddSelectToViewState(ViewState,PathExtension);
PageUtil.AddSelectToViewState(ViewState,PathQuality);
PageUtil.AddComboToViewState(ViewState,OpSurgeon);
PageUtil.AddComboToViewState(ViewState,OpAssistant);
PageUtil.AddComboToViewState(ViewState,PathHistology);
PageUtil.AddComboToViewState(ViewState,Pathologist);
PageUtil.AddComboToViewState(ViewState,PathDataSource);
PageUtil.AddComboToViewState(ViewState,OpDissectionExtent);
return base.SaveViewState();
}
override public HtmlInputHidden GetPrimKeyField()
{
return SurgeryId;
}
override protected DataEntryController GetController()
{
return new DataEntryController(new RPLNDDa(), RPLND.SurgeryId); //NOTE: fix args
}
override protected void SetDataEntryInfo()
{
this._tableInfo = "ProcRPLNDs";
// this._dataEntryTitle = "RPLNDs";
if(Request.QueryString["parentKey"] != null)
{
this._dataEntryTitle = "<a class=\"patientDataSectionTitle\" href=\"DataEntryContainer.aspx?dataForm=SurgeriesForm&primKey="+Request.QueryString["parentKey"]+"\">Surgeries</a> > RPLNDs";
}
else if(SurgeryId.Value != null && !SurgeryId.Value.ToString().Equals(""))
{
this._dataEntryTitle = "<a class=\"patientDataSectionTitle\" href=\"DataEntryContainer.aspx?dataForm=SurgeriesForm&primKey="+SurgeryId.Value.ToString()+"\">Surgeries</a> > RPLNDs";
}
}
override protected BizObject GetParams()
{
RPLND biz = new RPLND();
DataRow dr = biz.Tables[RPLND.Table_ProcRPLNDs].NewRow();
if (!SurgeryId.Value.Equals(""))
{
dr[RPLND.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[RPLND.OpCPT_Code] = Request.Form[OpCPT_Code.UniqueID].ToString();
dr[RPLND.OpCPT_Code] = OpCPT_Code.Value;
dr[RPLND.OpCPT_Description] = OpCPT_Description.Value;
dr[RPLND.OpSurgeon] = Request.Form[OpSurgeon.UniqueID].ToString();
dr[RPLND.OpSurgeonType] = Request.Form[OpSurgeonType.UniqueID].ToString();
dr[RPLND.OpAssistant] = Request.Form[OpAssistant.UniqueID].ToString();
dr[RPLND.OpAssistantType] = Request.Form[OpAssistantType.UniqueID].ToString();
dr[RPLND.OpType] = Request.Form[OpType.UniqueID].ToString();
dr[RPLND.OpIncisionType] = Request.Form[OpIncisionType.UniqueID].ToString();
dr[RPLND.OpDissectionExtent] = Request.Form[OpDissectionExtent.UniqueID].ToString();
dr[RPLND.OpNerveSparing] = Request.Form[OpNerveSparing.UniqueID].ToString();
dr[RPLND.OpDesperation] = Request.Form[OpDesperation.UniqueID].ToString();
dr[RPLND.OpNotes] = OpNotes.Value;
dr[RPLND.PathNum] = PathNum.Value;
dr[RPLND.PathStageSystem] = Request.Form[PathStageSystem.UniqueID].ToString();
if (Request.Form[PathStageGroup.UniqueID] != null && Request.Form[PathStageGroup.UniqueID].ToString() != "")
{
dr[RPLND.PathStageGroup] = Request.Form[PathStageGroup.UniqueID].ToString();
}
if (Request.Form[PathStageN.UniqueID] != null && Request.Form[PathStageN.UniqueID].ToString() != "")
{
dr[RPLND.PathStageN] = Request.Form[PathStageN.UniqueID].ToString();
}
if (Request.Form[PathStageM.UniqueID] != null && Request.Form[PathStageM.UniqueID].ToString() != "")
{
dr[RPLND.PathStageM] = Request.Form[PathStageM.UniqueID].ToString();
}
//dr[RPLND.PathExtension] = Request.Form[PathExtension.UniqueID].ToString();
dr[RPLND.PathExtension] = PathExtension.Value;
dr[RPLND.PathHistology] = Request.Form[PathHistology.UniqueID].ToString();
dr[RPLND.Pathologist] = Request.Form[Pathologist.UniqueID].ToString();
dr[RPLND.PathNotes] = PathNotes.Value;
dr[RPLND.PathDataSource] = Request.Form[PathDataSource.UniqueID].ToString();
dr[RPLND.PathQuality] = Request.Form[PathQuality.UniqueID].ToString();
AddBaseParams(dr);
biz.Tables[RPLND.Table_ProcRPLNDs].Rows.Add(dr);
biz.AcceptChanges();
return biz;
}
protected override void SetFields(BizObject bz)
{
RPLND biz = (RPLND)bz;
DataRow dr = biz.Tables[RPLND.Table_ProcRPLNDs].Rows[0];
//selects use: PageUtil.SelectDropDownItem(fieldIdName, dr[Object.FieldName]);
SurgeryId.Value = dr[RPLND.SurgeryId].ToString();
//PageUtil.SelectDropDownItem(OpCPT_Code, dr[RPLND.OpCPT_Code]);
OpCPT_Code.Value = dr[RPLND.OpCPT_Code].ToString();
OpCPT_Description.Value = dr[RPLND.OpCPT_Description].ToString();
OpSurgeon.Value = dr[RPLND.OpSurgeon].ToString();
PageUtil.SelectDropDownItem(OpSurgeonType, dr[RPLND.OpSurgeonType]);
OpAssistant.Value = dr[RPLND.OpAssistant].ToString();
PageUtil.SelectDropDownItem(OpAssistantType, dr[RPLND.OpAssistantType]);
PageUtil.SelectDropDownItem(OpType, dr[RPLND.OpType]);
PageUtil.SelectDropDownItem(OpIncisionType, dr[RPLND.OpIncisionType]);
OpDissectionExtent.Value = dr[RPLND.OpDissectionExtent].ToString();
PageUtil.SelectDropDownItem(OpNerveSparing, dr[RPLND.OpNerveSparing]);
PageUtil.SelectDropDownItem(OpDesperation, dr[RPLND.OpDesperation]);
OpNotes.Value = dr[RPLND.OpNotes].ToString();
PathNum.Value = dr[RPLND.PathNum].ToString();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -