📄 cystectomypathfindingsform.ascx.cs
字号:
namespace Caisis.UI.Modules.Bladder.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 CystectomyPathFindingsForm : DataGridControl
{
override protected DataEntryController GetController()
{
return new DataGridController(new CystectomyPathologyFindingDa(), CystectomyPathologyFinding.CystectomyPathFindingId);
}
override protected void SetDataEntryInfo()
{
this._tableInfo = "CystectomyPathFindings";
this._dataEntryTitle = "<a href=\"DataEntryContainer.aspx?dataForm=ProcCystectomiesPathForm&parentKey="+Request.QueryString["parentKey"]+"\"> Cystectomy Pathology</a> > Pathology Findings</a>";
}
protected override DataTable PhysicalDataRead()
{
DataGridController ct = new DataGridController(new CystectomyPathologyFindingDa(), CystectomyPathologyFinding.CystectomyPathFindingId);
DataSet ds = ct.GetDataGridRecords(int.Parse(Request.QueryString["parentKey"].ToString()));
return ds.Tables[0];
}
protected override DataSet GetGridRow(DataGridCommandEventArgs e)
{
CystectomyPathologyFinding biz = new CystectomyPathologyFinding();
DataSet ds = new DataSet();
ds.Tables.Add(biz);
DataRow dr = biz.NewRow();
HtmlSelect PathFindSide = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect PathFindLevel = (HtmlSelect) e.Item.FindControl("PathFindLevel");
HtmlSelect PathFindLaterality = (HtmlSelect) e.Item.FindControl("PathFindLaterality");
HtmlSelect PathFindAP = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect PathFindSite = (HtmlSelect) e.Item.FindControl("PathFindSite");
HtmlSelect PathFindStageT = (HtmlSelect) e.Item.FindControl("PathFindStageT");
HtmlSelect PathFindGrade = (HtmlSelect) e.Item.FindControl("PathFindGrade");
TextBox PathFindNum = (TextBox) e.Item.Cells[8].Controls[0];
PathFindNum.Width = 60;
TextBox PathFindMaxDim = (TextBox) e.Item.Cells[9].Controls[0];
PathFindMaxDim.Width = 60;
TextBox PathFindNotes = (TextBox) e.Item.Cells[10].Controls[0];
PathFindNotes.Width = 100;
TextBox updateTime = (TextBox) e.Item.FindControl("UpdateTime");
dr[BizObject.UpdatedTime] = PageUtil.ObjToDateTime(updateTime.Text);
dr[CystectomyPathologyFinding.SurgeryId] = Request.QueryString["parentKey"].ToString();
dr[CystectomyPathologyFinding.CystectomyPathFindingId] = grid.DataKeys[e.Item.ItemIndex];
dr[CystectomyPathologyFinding.PathFindSide] = Request.Form[PathFindSide.UniqueID].ToString();
dr[CystectomyPathologyFinding.PathFindLevel] = Request.Form[PathFindLevel.UniqueID].ToString();
dr[CystectomyPathologyFinding.PathFindLaterality] = Request.Form[PathFindLaterality.UniqueID].ToString();
dr[CystectomyPathologyFinding.PathFindAP] = Request.Form[PathFindAP.UniqueID].ToString();
dr[CystectomyPathologyFinding.PathFindSite] = Request.Form[PathFindSite.UniqueID].ToString();
dr[CystectomyPathologyFinding.PathFindStageT] = Request.Form[PathFindStageT.UniqueID].ToString();
dr[CystectomyPathologyFinding.PathFindGrade] = Request.Form[PathFindGrade.UniqueID].ToString();
dr[CystectomyPathologyFinding.PathFindNum] = PathFindNum.Text;
dr[CystectomyPathologyFinding.PathFindMaxDim] = PathFindMaxDim.Text;
dr[CystectomyPathologyFinding.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;
HtmlSelect pathfindside = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect pathfindlevel = (HtmlSelect) e.Item.FindControl("PathFindLevel");
HtmlSelect pathfindlaterality = (HtmlSelect) e.Item.FindControl("PathFindLaterality");
HtmlSelect pathfindap = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect pathfindsite = (HtmlSelect) e.Item.FindControl("PathFindSite");
HtmlSelect pathfindstaget = (HtmlSelect) e.Item.FindControl("PathFindStageT");
HtmlSelect pathfindgrade = (HtmlSelect) e.Item.FindControl("PathFindGrade");
TextBox pathfindnum = (TextBox) e.Item.Cells[8].Controls[0];
pathfindnum.Width = 60;
TextBox pathfindmaxdim = (TextBox) e.Item.Cells[9].Controls[0];
pathfindmaxdim.Width = 60;
TextBox pathfindnotes = (TextBox) e.Item.Cells[10].Controls[0];
pathfindnotes.Width = 100;
PageUtil.FillLkpDropDown(pathfindside, "FindSide");
PageUtil.SelectDropDownItem(pathfindside, drv[CystectomyPathologyFinding.PathFindSide].ToString());
PageUtil.FillLkpDropDown(pathfindlevel, "BladderLevel");
PageUtil.SelectDropDownItem(pathfindlevel, drv[CystectomyPathologyFinding.PathFindLevel].ToString());
PageUtil.FillLkpDropDown(pathfindlaterality, "Laterality");
PageUtil.SelectDropDownItem(pathfindlaterality, drv[CystectomyPathologyFinding.PathFindLaterality].ToString());
PageUtil.FillLkpDropDown(pathfindap, "AP");
PageUtil.SelectDropDownItem(pathfindap, drv[CystectomyPathologyFinding.PathFindAP].ToString());
PageUtil.FillLkpDropDown(pathfindsite, "PathFindSiteBladder");
PageUtil.SelectDropDownItem(pathfindsite, drv[CystectomyPathologyFinding.PathFindSite].ToString());
PageUtil.FillLkpDropDown(pathfindstaget, "BladderPathStageT");
PageUtil.SelectDropDownItem(pathfindstaget, drv[CystectomyPathologyFinding.PathFindStageT].ToString());
PageUtil.FillLkpDropDown(pathfindgrade, "PathGrade");
PageUtil.SelectDropDownItem(pathfindgrade, drv[CystectomyPathologyFinding.PathFindGrade].ToString());
//
TextBox surgeryId = (TextBox) e.Item.FindControl("SurgeryId");
surgeryId.Text = drv[CystectomyPathologyFinding.SurgeryId].ToString();
TextBox updateTime = (TextBox)e.Item.FindControl("UpdateTime");
updateTime.Text = drv[BizObject.UpdatedTime].ToString();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -