📄 nephrectomypathfindingsform.ascx.cs
字号:
namespace Caisis.UI.Modules.Kidney.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 NephrectomyPathFindingsForm : DataGridControl
{
override protected DataEntryController GetController()
{
return new DataGridController(new NephrectomyPathologyFindingDa(), NephrectomyPathologyFinding.NephrectomyPathFindingId);
}
override protected void SetDataEntryInfo()
{
// need to get parent surgery Id to pass in url.. argg
NephrectomyDa da = new NephrectomyDa();
BizObject biz = da.GetRecord(int.Parse(Request.QueryString["parentKey"])); // pass in nephrectomy id
string surgeryId = biz.Tables[0].Rows[0][Nephrectomy.SurgeryId].ToString();
this._tableInfo = "NephrectomyPathFindings";
this._dataEntryTitle = "<a href=\"DataEntryContainer.aspx?dataForm=ProcNephrectomiesForm&nephId="+Request.QueryString["parentKey"]+"&parentKey=" + surgeryId +"\"> Nephrectomies</a> > Pathology Findings";
}
protected override DataTable PhysicalDataRead()
{
DataGridController ct = new DataGridController(new NephrectomyPathologyFindingDa(), NephrectomyPathologyFinding.NephrectomyPathFindingId);
DataSet ds = ct.GetDataGridRecords(int.Parse(Request.QueryString["parentKey"].ToString()));
return ds.Tables[0];
}
protected override DataSet GetGridRow(DataGridCommandEventArgs e)
{
NephrectomyPathologyFinding biz = new NephrectomyPathologyFinding();
DataSet ds = new DataSet();
ds.Tables.Add(biz);
DataRow dr = biz.NewRow();
TextBox PathFindCancerMaxDim = (TextBox) e.Item.Cells[1].Controls[0];
PathFindCancerMaxDim.Width = 60;
HtmlSelect PathFindHistology = (HtmlSelect) e.Item.FindControl("PathFindHistology");
HtmlSelect PathFindPole = (HtmlSelect) e.Item.FindControl("PathFindPole");
HtmlSelect PathFindAP = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect PathFindLat = (HtmlSelect) e.Item.FindControl("PathFindLat");
HtmlSelect PathFindSite = (HtmlSelect) e.Item.FindControl("PathFindSite");
HtmlSelect PathFindGrade = (HtmlSelect) e.Item.FindControl("PathFindGrade");
HtmlSelect PathFindPattern = (HtmlSelect) e.Item.FindControl("PathFindPattern");
HtmlSelect PathFindSarcomatoid = (HtmlSelect) e.Item.FindControl("PathFindSarcomatoid");
HtmlSelect PathFindNecrosis = (HtmlSelect) e.Item.FindControl("PathFindNecrosis");
HtmlSelect PathFindVascularInv = (HtmlSelect) e.Item.FindControl("PathFindVascularInv");
HtmlSelect PathFindRV_Inv = (HtmlSelect) e.Item.FindControl("PathFindRV_Inv");
HtmlSelect PathFindIVC_Inv = (HtmlSelect) e.Item.FindControl("PathFindIVC_Inv");
HtmlSelect PathFindIVC_WallInv = (HtmlSelect) e.Item.FindControl("PathFindIVC_WallInv");
HtmlSelect PathFindExtension = (HtmlSelect) e.Item.FindControl("PathFindExtension");
TextBox PathFindNotes = (TextBox) e.Item.Cells[16].Controls[0];
PathFindNotes.Width = 100;
TextBox updateTime = (TextBox) e.Item.FindControl("UpdateTime");
dr[BizObject.UpdatedTime] = PageUtil.ObjToDateTime(updateTime.Text);
dr[NephrectomyPathologyFinding.ProcNephrectomyId] = Request.QueryString["parentKey"].ToString();
dr[NephrectomyPathologyFinding.NephrectomyPathFindingId] = grid.DataKeys[e.Item.ItemIndex];
dr[NephrectomyPathologyFinding.PathFindCancerMaxDim] = PathFindCancerMaxDim.Text;
//should be COMBOBOX
dr[NephrectomyPathologyFinding.PathFindHistology] = Request.Form[PathFindHistology.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindPole] = Request.Form[PathFindPole.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindAP] = Request.Form[PathFindAP.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindLat] = Request.Form[PathFindLat.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindSite] = Request.Form[PathFindSite.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindGrade] = Request.Form[PathFindGrade.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindPattern] = Request.Form[PathFindPattern.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindSarcomatoid] = Request.Form[PathFindSarcomatoid.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindNecrosis] = Request.Form[PathFindNecrosis.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindVascularInv] = Request.Form[PathFindVascularInv.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindRV_Inv] = Request.Form[PathFindRV_Inv.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindIVC_Inv] = Request.Form[PathFindIVC_Inv.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindIVC_WallInv] = Request.Form[PathFindIVC_WallInv.UniqueID].ToString();
dr[NephrectomyPathologyFinding.PathFindExtension] = Request.Form[PathFindExtension.UniqueID].ToString();
dr[NephrectomyPathologyFinding.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 pathfindcancermaxdim = (TextBox) e.Item.Cells[1].Controls[0];
pathfindcancermaxdim.Width = 60;
HtmlSelect pathfindhistology = (HtmlSelect) e.Item.FindControl("PathFindHistology");
HtmlSelect pathfindpole = (HtmlSelect) e.Item.FindControl("PathFindPole");
HtmlSelect pathfindap = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect pathfindlat = (HtmlSelect) e.Item.FindControl("PathFindLat");
HtmlSelect pathfindsite = (HtmlSelect) e.Item.FindControl("PathFindSite");
HtmlSelect pathfindgrade = (HtmlSelect) e.Item.FindControl("PathFindGrade");
HtmlSelect pathfindpattern = (HtmlSelect) e.Item.FindControl("PathFindPattern");
HtmlSelect pathfindsarcomatoid = (HtmlSelect) e.Item.FindControl("PathFindSarcomatoid");
HtmlSelect pathfindnecrosis = (HtmlSelect) e.Item.FindControl("PathFindNecrosis");
HtmlSelect pathfindvascularinv = (HtmlSelect) e.Item.FindControl("PathFindVascularInv");
HtmlSelect pathfindrv_inv = (HtmlSelect) e.Item.FindControl("PathFindRV_Inv");
HtmlSelect pathfindivc_inv = (HtmlSelect) e.Item.FindControl("PathFindIVC_Inv");
HtmlSelect pathfindivc_wallinv = (HtmlSelect) e.Item.FindControl("PathFindIVC_WallInv");
HtmlSelect pathfindextension = (HtmlSelect) e.Item.FindControl("PathFindExtension");
TextBox pathfindnotes = (TextBox) e.Item.Cells[16].Controls[0];
pathfindnotes.Width = 100;
PageUtil.FillLkpDropDown(pathfindhistology, "PathHistologyKidney");
PageUtil.SelectDropDownItem(pathfindhistology, drv[NephrectomyPathologyFinding.PathFindHistology].ToString());
PageUtil.FillLkpDropDown(pathfindpole, "KidneyPole");
PageUtil.SelectDropDownItem(pathfindpole, drv[NephrectomyPathologyFinding.PathFindPole].ToString());
PageUtil.FillLkpDropDown(pathfindap, "AP");
PageUtil.SelectDropDownItem(pathfindap, drv[NephrectomyPathologyFinding.PathFindAP].ToString());
PageUtil.FillLkpDropDown(pathfindlat, "Laterality");
PageUtil.SelectDropDownItem(pathfindlat, drv[NephrectomyPathologyFinding.PathFindLat].ToString());
//Select Distinct
PageUtil.FillLkpDropDown(pathfindsite, "PathFindSiteKidney");
PageUtil.SelectDropDownItem(pathfindsite, drv[NephrectomyPathologyFinding.PathFindSite].ToString());
PageUtil.FillLkpDropDown(pathfindgrade, "PathGrade");
PageUtil.SelectDropDownItem(pathfindgrade, drv[NephrectomyPathologyFinding.PathFindGrade].ToString());
PageUtil.FillLkpDropDown(pathfindpattern, "PathPatternKidney");
PageUtil.SelectDropDownItem(pathfindpattern, drv[NephrectomyPathologyFinding.PathFindPattern].ToString());
PageUtil.FillLkpDropDown(pathfindsarcomatoid, "YesNoUnknown");
PageUtil.SelectDropDownItem(pathfindsarcomatoid, drv[NephrectomyPathologyFinding.PathFindSarcomatoid].ToString());
PageUtil.FillLkpDropDown(pathfindnecrosis, "YesNoUnknown");
PageUtil.SelectDropDownItem(pathfindnecrosis, drv[NephrectomyPathologyFinding.PathFindNecrosis].ToString());
PageUtil.FillLkpDropDown(pathfindvascularinv, "YesNoUnknown");
PageUtil.SelectDropDownItem(pathfindvascularinv, drv[NephrectomyPathologyFinding.PathFindVascularInv].ToString());
PageUtil.FillLkpDropDown(pathfindrv_inv, "InvasionKidney");
PageUtil.SelectDropDownItem(pathfindrv_inv, drv[NephrectomyPathologyFinding.PathFindRV_Inv].ToString());
PageUtil.FillLkpDropDown(pathfindivc_inv, "InvasionKidney");
PageUtil.SelectDropDownItem(pathfindivc_inv, drv[NephrectomyPathologyFinding.PathFindIVC_Inv].ToString());
PageUtil.FillLkpDropDown(pathfindivc_wallinv, "InvasionKidney");
PageUtil.SelectDropDownItem(pathfindivc_wallinv, drv[NephrectomyPathologyFinding.PathFindIVC_WallInv].ToString());
PageUtil.FillLkpDropDown(pathfindextension, "LocalExtensionKidney");
PageUtil.SelectDropDownItem(pathfindextension, drv[NephrectomyPathologyFinding.PathFindExtension].ToString());
TextBox fkId = (TextBox) e.Item.FindControl("ProcNephrectomyId");
fkId.Text = drv[NephrectomyPathologyFinding.ProcNephrectomyId].ToString();
TextBox updateTime = (TextBox)e.Item.FindControl("UpdateTime");
updateTime.Text = drv[BizObject.UpdatedTime].ToString();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -