📄 prostatectomypathfindingsform.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;
public abstract class ProstatectomyPathFindingsForm : DataGridControl
{
override protected DataEntryController GetController()
{
return new DataGridController(new ProstatectomyPathologyFindingDa(), ProstatectomyPathologyFinding.PathFindingId);
}
override protected void SetDataEntryInfo()
{
this._tableInfo = "ProstatectomyPathFindings";
this._dataEntryTitle = "<a href=\"DataEntryContainer.aspx?dataForm=ProcProstatectomiesPathForm&parentKey="+Request.QueryString["parentKey"]+"\"> Prostatectomy Pathology</a> > Findings";
}
protected override DataTable PhysicalDataRead()
{
DataGridController ct = new DataGridController(new ProstatectomyPathologyFindingDa(), ProstatectomyPathologyFinding.PathFindingId);
DataSet ds = ct.GetDataGridRecords(int.Parse(Request.QueryString["parentKey"].ToString()));
return ds.Tables[0];
}
protected override DataSet GetGridRow(DataGridCommandEventArgs e)
{
ProstatectomyPathologyFinding biz = new ProstatectomyPathologyFinding();
DataSet ds = new DataSet();
ds.Tables.Add(biz);
DataRow dr = biz.NewRow();
//TextBox PathSectionId = (TextBox) e.Item.Cells[1].Controls[0];
//TextBox PathSectionId = (TextBox)e.Item.FindControl("PathSectionId");
//PathSectionId.Width = 100;
HtmlSelect PathFindSection = (HtmlSelect) e.Item.FindControl("PathFindSection");
HtmlSelect PathFindSide = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect PathFindLevel = (HtmlSelect) e.Item.FindControl("PathFindLevel");
HtmlSelect PathFindAP = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect PathFindLat = (HtmlSelect) e.Item.FindControl("PathFindLat");
HtmlSelect PathFindZone = (HtmlSelect) e.Item.FindControl("PathFindZone");
TextBox PathFindIndex = (TextBox) e.Item.Cells[7].Controls[0];
PathFindIndex.Width = 100;
TextBox PathFindCancerMaxDim = (TextBox) e.Item.Cells[8].Controls[0];
PathFindCancerMaxDim.Width = 100;
TextBox PathFindCancerArea = (TextBox) e.Item.Cells[9].Controls[0];
PathFindCancerArea.Width = 100;
TextBox PathFindCancerVolume = (TextBox) e.Item.Cells[10].Controls[0];
PathFindCancerVolume.Width = 100;
HtmlSelect PathFindMarginStatus = (HtmlSelect) e.Item.FindControl("PathFindMarginStatus");
HtmlSelect PathFindAddTissueMarginStatus = (HtmlSelect) e.Item.FindControl("PathFindAddTissueMarginStatus");
HtmlSelect PathFindExtension = (HtmlSelect) e.Item.FindControl("PathFindExtension");
TextBox PathFindGG1 = (TextBox) e.Item.Cells[14].Controls[0];
PathFindGG1.Width = 100;
TextBox PathFindGG2 = (TextBox) e.Item.Cells[15].Controls[0];
PathFindGG2.Width = 100;
TextBox PathFindGGS = (TextBox) e.Item.Cells[16].Controls[0];
PathFindGGS.Width = 100;
HtmlSelect PathFindResult = (HtmlSelect) e.Item.FindControl("PathFindResult");
HtmlSelect PathFindPNI = (HtmlSelect) e.Item.FindControl("PathFindPNI");
TextBox PathFindPNI_Diam = (TextBox) e.Item.Cells[19].Controls[0];
PathFindPNI_Diam.Width = 100;
HtmlSelect PathFindVascularInv = (HtmlSelect) e.Item.FindControl("PathFindVascularInv");
TextBox PathFindNotes = (TextBox) e.Item.Cells[21].Controls[0];
PathFindNotes.Width = 100;
TextBox updateTime = (TextBox) e.Item.FindControl("UpdateTime");
dr[BizObject.UpdatedTime] = PageUtil.ObjToDateTime(updateTime.Text);
dr[ProstatectomyPathologyFinding.SurgeryId] = Request.QueryString["parentKey"].ToString();
dr[ProstatectomyPathologyFinding.PathFindingId] = grid.DataKeys[e.Item.ItemIndex];
//dr[ProstatectomyPathologyFinding.PathSectionId] = PageUtil.ObjToInt(PathSectionId.Text);
dr[ProstatectomyPathologyFinding.PathFindSection] = Request.Form[PathFindSection.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindSide] = Request.Form[PathFindSide.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindLevel] = Request.Form[PathFindLevel.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindAP] = Request.Form[PathFindAP.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindLat] = Request.Form[PathFindLat.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindZone] = Request.Form[PathFindZone.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindIndex] = PathFindIndex.Text;
dr[ProstatectomyPathologyFinding.PathFindCancerMaxDim] = PathFindCancerMaxDim.Text;
dr[ProstatectomyPathologyFinding.PathFindCancerArea] = PathFindCancerArea.Text;
dr[ProstatectomyPathologyFinding.PathFindCancerVolume] = PathFindCancerVolume.Text;
//should be COMBOBOX
dr[ProstatectomyPathologyFinding.PathFindMarginStatus] = Request.Form[PathFindMarginStatus.UniqueID].ToString();
//shoudl be COMBOBOX
dr[ProstatectomyPathologyFinding.PathFindAddTissueMarginStatus] = Request.Form[PathFindAddTissueMarginStatus.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindExtension] = Request.Form[PathFindExtension.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindGG1] = PathFindGG1.Text;
dr[ProstatectomyPathologyFinding.PathFindGG2] = PathFindGG2.Text;
dr[ProstatectomyPathologyFinding.PathFindGGS] = PathFindGGS.Text;
dr[ProstatectomyPathologyFinding.PathFindResult] = Request.Form[PathFindResult.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindPNI] = Request.Form[PathFindPNI.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindPNI_Diam] = PathFindPNI_Diam.Text;
dr[ProstatectomyPathologyFinding.PathFindVascularInv] = Request.Form[PathFindVascularInv.UniqueID].ToString();
dr[ProstatectomyPathologyFinding.PathFindNotes] = PathFindNotes.Text;
biz.Rows.Add(dr);
return ds;
}
public void ItemBound(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.EditItem)
{
DataRowView drv = (DataRowView) e.Item.DataItem;
//TextBox pathsectionid = (TextBox) e.Item.Cells[1].Controls[0];
//TextBox pathsectionid = (TextBox) e.Item.FindControl("PathSectionId");
//pathsectionid.Width = 100;
HtmlSelect pathfindsection = (HtmlSelect) e.Item.FindControl("PathFindSection");
HtmlSelect pathfindside = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect pathfindlevel = (HtmlSelect) e.Item.FindControl("PathFindLevel");
HtmlSelect pathfindap = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect pathfindlat = (HtmlSelect) e.Item.FindControl("PathFindLat");
HtmlSelect pathfindzone = (HtmlSelect) e.Item.FindControl("PathFindZone");
TextBox pathfindindex = (TextBox) e.Item.Cells[7].Controls[0];
pathfindindex.Width = 100;
TextBox pathfindcancermaxdim = (TextBox) e.Item.Cells[8].Controls[0];
pathfindcancermaxdim.Width = 100;
TextBox pathfindcancerarea = (TextBox) e.Item.Cells[9].Controls[0];
pathfindcancerarea.Width = 100;
TextBox pathfindcancervolume = (TextBox) e.Item.Cells[10].Controls[0];
pathfindcancervolume.Width = 100;
HtmlSelect pathfindmarginstatus = (HtmlSelect) e.Item.FindControl("PathFindMarginStatus");
HtmlSelect pathfindaddtissuemarginstatus = (HtmlSelect) e.Item.FindControl("PathFindAddTissueMarginStatus");
HtmlSelect pathfindextension = (HtmlSelect) e.Item.FindControl("PathFindExtension");
TextBox pathfindgg1 = (TextBox) e.Item.Cells[14].Controls[0];
pathfindgg1.Width = 100;
TextBox pathfindgg2 = (TextBox) e.Item.Cells[15].Controls[0];
pathfindgg2.Width = 100;
TextBox pathfindggs = (TextBox) e.Item.Cells[16].Controls[0];
pathfindggs.Width = 100;
HtmlSelect pathfindresult = (HtmlSelect) e.Item.FindControl("PathFindResult");
HtmlSelect pathfindpni = (HtmlSelect) e.Item.FindControl("PathFindPNI");
TextBox pathfindpni_diam = (TextBox) e.Item.Cells[19].Controls[0];
pathfindpni_diam.Width = 100;
HtmlSelect pathfindvascularinv = (HtmlSelect) e.Item.FindControl("PathFindVascularInv");
TextBox pathfindnotes = (TextBox) e.Item.Cells[21].Controls[0];
pathfindnotes.Width = 100;
//fill section drop down with sections from findings table
FillSectionDropDown(pathfindsection);
PageUtil.SelectDropDownItem(pathfindsection, drv[ProstatectomyPathologyFinding.PathFindSection].ToString());
PageUtil.FillLkpDropDown(pathfindside, "ProstateSide");
PageUtil.SelectDropDownItem(pathfindside, drv[ProstatectomyPathologyFinding.PathFindSide].ToString());
PageUtil.FillLkpDropDown(pathfindlevel, "ProstateLevel");
PageUtil.SelectDropDownItem(pathfindlevel, drv[ProstatectomyPathologyFinding.PathFindLevel].ToString());
PageUtil.FillLkpDropDown(pathfindap, "AP");
PageUtil.SelectDropDownItem(pathfindap, drv[ProstatectomyPathologyFinding.PathFindAP].ToString());
PageUtil.FillLkpDropDown(pathfindlat, "Laterality");
PageUtil.SelectDropDownItem(pathfindlat, drv[ProstatectomyPathologyFinding.PathFindLat].ToString());
PageUtil.FillLkpDropDown(pathfindzone, "ProstateZone");
PageUtil.SelectDropDownItem(pathfindzone, drv[ProstatectomyPathologyFinding.PathFindZone].ToString());
PageUtil.FillLkpDropDown(pathfindmarginstatus, "MarginStatus");
PageUtil.SelectDropDownItem(pathfindmarginstatus, drv[ProstatectomyPathologyFinding.PathFindMarginStatus].ToString());
PageUtil.FillLkpDropDown(pathfindaddtissuemarginstatus, "MarginStatus");
PageUtil.SelectDropDownItem(pathfindaddtissuemarginstatus, drv[ProstatectomyPathologyFinding.PathFindAddTissueMarginStatus].ToString());
PageUtil.FillLkpDropDown(pathfindextension, "LocalExtensionProstate");
PageUtil.SelectDropDownItem(pathfindextension, drv[ProstatectomyPathologyFinding.PathFindExtension].ToString());
PageUtil.FillLkpDropDown(pathfindresult, "ResultProstate");
PageUtil.SelectDropDownItem(pathfindresult, drv[ProstatectomyPathologyFinding.PathFindResult].ToString());
PageUtil.FillLkpDropDown(pathfindpni, "PNI");
PageUtil.SelectDropDownItem(pathfindpni, drv[ProstatectomyPathologyFinding.PathFindPNI].ToString());
PageUtil.FillLkpDropDown(pathfindvascularinv, "YesNoUnknown");
PageUtil.SelectDropDownItem(pathfindvascularinv, drv[ProstatectomyPathologyFinding.PathFindVascularInv].ToString());
TextBox surgId = (TextBox) e.Item.FindControl("SurgeryId");
surgId.Text = drv[ProstatectomyPathologyFinding.SurgeryId].ToString();
TextBox updateTime = (TextBox)e.Item.FindControl("UpdateTime");
updateTime.Text = drv[BizObject.UpdatedTime].ToString();
}
}
protected void FillSectionDropDown(HtmlSelect select)
{
ProstatectomyPathologySectionDa da = new ProstatectomyPathologySectionDa();
DataSet sectionDs = da.GetRecords(int.Parse(Request.QueryString["parentKey"].ToString()));
if (sectionDs.Tables.Count > 0 && sectionDs.Tables[0].Rows.Count > 0)
{
select.DataSource = sectionDs.Tables[0].DefaultView;
select.DataValueField = "PathSection";
select.DataTextField = "PathSection";
select.DataBind();
select.Items.Insert(0,new ListItem(""));
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -