📄 brachytherapyform.ascx.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;
using Caisis.UI.Core.Classes.CustomControls;
public abstract class BrachyTherapyForm : DataEntryControlRelOne
{
protected HtmlInputText BrachyCPT_Code;
protected HtmlInputText BrachyCPT_Description;
protected ComboBox BrachyPhysician;
protected HtmlInputCheckBox BrachyPending;
protected HtmlInputText BrachyDateText;
protected HtmlInputText BrachyDate;
protected HtmlInputText BrachyTime;
protected HtmlSelect BrachyPrescribedDose;
protected HtmlTextArea BrachyDoseNotes;
protected HtmlSelect BrachyIsotope;
protected HtmlInputText BrachyRecTotActivity;
protected HtmlInputText BrachySeedStrength;
protected HtmlInputText BrachyTotalActivity;
protected HtmlInputText BrachyPercentActivity;
protected HtmlInputText BrachyNumSeedsPlanned;
protected HtmlInputText BrachyNumNeedlesPlanned;
protected HtmlInputText BrachyPreV100;
protected HtmlInputText BrachyPreV150;
protected HtmlInputText BrachyPreV200;
protected HtmlInputText BrachyPreD90;
protected HtmlInputText BrachyPreUrethraVolume;
protected HtmlInputText BrachyPreUrethraD90;
protected HtmlInputText BrachyOR_US_Volume;
protected HtmlInputText BrachyOR_V100;
protected HtmlInputText BrachyOR_V150;
protected HtmlInputText BrachyOR_V200;
protected HtmlInputText BrachyOR_D90;
protected HtmlInputText BrachyOR_UrethraVolume;
protected HtmlInputText BrachyOR_UrethraD90;
protected HtmlInputText BrachyNumSeeds;
protected HtmlInputText BrachyNumNeedles;
protected HtmlInputText BrachyDVH;
protected HtmlInputText BrachyV90;
protected HtmlInputText BrachyV100;
protected HtmlInputText BrachyV150;
protected HtmlInputText BrachyV200;
protected HtmlInputText BrachyD80;
protected HtmlInputText BrachyD90;
protected HtmlInputText BrachyPercD90;
protected HtmlInputText BrachyD100;
protected HtmlInputText BrachyPercD100;
protected HtmlInputText BrachyMinDose;
protected HtmlInputText BrachyMPD;
protected HtmlInputText BrachyVg100;
protected HtmlInputText BrachyMaxUrethraDose;
protected HtmlInputText BrachyAvgUrethraDose;
protected HtmlInputText BrachyUrethraV100;
protected HtmlInputText BrachyUrethraV150;
protected HtmlInputText BrachyUrethraV200;
protected HtmlInputText BrachyUrethraD90;
protected HtmlInputText BrachyUrethraD5;
protected HtmlInputText BrachyMaxRectDose;
protected HtmlInputText BrachyAvgRectDose;
protected HtmlInputText BrachyLungSeeds;
protected HtmlInputText BrachyPelvisSeeds;
protected HtmlInputText BrachyProstateSeeds;
protected ComboBox BrachyInstitution;
protected HtmlTextArea BrachyNotes;
protected ComboBox BrachyDataSource;
protected HtmlSelect BrachyQuality;
protected HtmlInputHidden PatientId;
//new fields 8/24/04
protected HtmlInputText BrachyRectumV100;
protected HtmlInputText BrachyRectumV150;
protected HtmlInputText BrachyRectumV200;
protected HtmlInputText BrachyUrethraD30;
protected HtmlInputText BrachyNVB;
protected HtmlInputText BrachyPenileBulb;
protected HtmlImage BrachyDateTextCal;
protected HyperLink SeedsAssignedFormLink;
override protected void Page_Load(object sender, System.EventArgs e)
{
//if (!Page.IsPostBack)
//{
// PatientId.Value=this.patientID.ToString();
// base.DisableFormFields();
// base.PopulateForm();
//}
//populate look up and distinct value select boxes
//PageUtil.FillLkpDropDown(BrachyCPT_Code, "CPT_Codes", ViewState);
PageUtil.FillLkpDropDown(BrachyIsotope, "SeedIsotope", ViewState);
PageUtil.FillLkpDropDown(BrachyPrescribedDose, "BrachyPrescribedDose", ViewState);
PageUtil.FillLkpDropDown(BrachyQuality, "DataQuality", ViewState);
//create arrays that populate combo boxes
Page.RegisterClientScriptBlock("BrachyInstitution", PageUtil.FillComboDropDown(BrachyInstitution.RefBy, "Institution"));
Page.RegisterClientScriptBlock("BrachyPhysician", PageUtil.FillComboDropDown(BrachyPhysician.RefBy, "RadiationOncologist"));
Page.RegisterClientScriptBlock("BrachyDataSource", PageUtil.FillComboDropDown(BrachyDataSource.RefBy, "DataSource"));
string reqFieldArray = PageUtil.CreateValidationScript("");
Page.RegisterClientScriptBlock("requiredFieldArray", reqFieldArray);
PageUtil.AddCalendarFunction(BrachyDateTextCal, BrachyDateText);
PageUtil.AddFuzzyDateFunction(BrachyDateText, BrachyDate);
base.Page_Load(sender, e);
}
override protected object SaveViewState()
{
//add select and combo boxes to view state
//PageUtil.AddSelectToViewState(ViewState,BrachyCPT_Code);
PageUtil.AddSelectToViewState(ViewState,BrachyIsotope);
PageUtil.AddSelectToViewState(ViewState,BrachyQuality);
PageUtil.AddSelectToViewState(ViewState,BrachyPrescribedDose);
PageUtil.AddComboToViewState(ViewState,BrachyInstitution);
PageUtil.AddComboToViewState(ViewState,BrachyPhysician);
PageUtil.AddComboToViewState(ViewState,BrachyDataSource);
return base.SaveViewState();
}
override public HtmlInputHidden GetPrimKeyField()
{
return PatientId;
}
override protected DataEntryController GetController()
{
return new DataEntryController(new BrachyTherapyDa(), BrachyTherapy.PatientId); //NOTE: fix args
}
override protected void SetDataEntryInfo()
{
this._tableInfo = "BrachyTherapy";//button logic in DataEntryContainer depends on this string
this._dataEntryTitle = "BrachyTherapy";
}
override protected BizObject GetParams()
{
BrachyTherapy biz = new BrachyTherapy();
DataRow dr = biz.Tables[BrachyTherapy.Table_BrachyTherapy].NewRow();
//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[BrachyTherapy.PatientId] = this.patientID;
//dr[BrachyTherapy.BrachyCPT_Code] = Request.Form[BrachyCPT_Code.UniqueID].ToString();
dr[BrachyTherapy.BrachyCPT_Code] = BrachyCPT_Code.Value;
dr[BrachyTherapy.BrachyCPT_Description] = BrachyCPT_Description.Value;
dr[BrachyTherapy.BrachyPhysician] = Request.Form[BrachyPhysician.UniqueID].ToString();
dr[BrachyTherapy.BrachyPending] = BrachyPending.Checked;
dr[BrachyTherapy.BrachyDateText] = Request.Form[BrachyDateText.UniqueID].ToString();
dr[BrachyTherapy.BrachyDate] = PageUtil.ObjToDateTime(BrachyDate.Value);
dr[BrachyTherapy.BrachyTime] = BrachyTime.Value;
dr[BrachyTherapy.BrachyPrescribedDose] = Request.Form[BrachyPrescribedDose.UniqueID].ToString();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -