📄 endoscopypathfindingsform.ascx.cs
字号:
// fixed line 81 on 8/24/05. was crossing histology data with pattern, fs
namespace Caisis.UI.Modules.All.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 EndoscopyPathFindingsForm : DataGridControl
{
override protected DataEntryController GetController()
{
return new DataGridController(new EndoscopyPathologyFindingDa(), EndoscopyPathologyFinding.EndoscopyPathFindingId);
}
override protected void SetDataEntryInfo()
{
this._tableInfo = "EndoscopyPathFindings";
this._dataEntryTitle = "<a href=\"DataEntryContainer.aspx?dataForm=ProcEndoscopiesForm&primKey="+Request.QueryString["parentKey"]+"\"> Endoscopy</a> > Pathology Findings";
}
protected override DataTable PhysicalDataRead()
{
DataGridController ct = new DataGridController(new EndoscopyPathologyFindingDa(), EndoscopyPathologyFinding.EndoscopyPathFindingId);
DataSet ds = ct.GetDataGridRecords(int.Parse(Request.QueryString["parentKey"].ToString()));
return ds.Tables[0];
}
protected override DataSet GetGridRow(DataGridCommandEventArgs e)
{
EndoscopyPathologyFinding biz = new EndoscopyPathologyFinding();
DataSet ds = new DataSet();
ds.Tables.Add(biz);
DataRow dr = biz.NewRow();
//HtmlSelect PathFindProc = (HtmlSelect) e.Item.FindControl("PathFindProc");
// TextBox PathFindProc = (TextBox) e.Item.Cells[1].Controls[0];
// PathFindProc.Width = 50;
HtmlSelect PathFindProc = (HtmlSelect) e.Item.FindControl("PathFindProc");
HtmlSelect PathFindSide = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect PathFindLaterality = (HtmlSelect) e.Item.FindControl("PathFindLaterality");
HtmlSelect PathFindLevel = (HtmlSelect) e.Item.FindControl("PathFindLevel");
HtmlSelect PathFindAP = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect PathFindSite = (HtmlSelect) e.Item.FindControl("PathFindSite");
HtmlSelect PathFindPattern = (HtmlSelect) e.Item.FindControl("PathFindPattern");
HtmlSelect PathFindHistology = (HtmlSelect) e.Item.FindControl("PathFindHistology");
TextBox PathFindStageT = (TextBox) e.Item.Cells[9].Controls[0];
PathFindStageT.Width = 50;
//HtmlSelect PathFindStageT = (HtmlSelect) e.Item.FindControl("PathFindStageT");
HtmlSelect PathFindGrade = (HtmlSelect) e.Item.FindControl("PathFindGrade");
TextBox PathFindMaxDim = (TextBox) e.Item.Cells[11].Controls[0];
PathFindMaxDim.Width = 50;
TextBox PathFindNum = (TextBox) e.Item.Cells[12].Controls[0];
PathFindNum.Width = 50;
HtmlSelect PathFindMucosa = (HtmlSelect) e.Item.FindControl("PathFindMucosa");
TextBox updateTime = (TextBox) e.Item.FindControl("UpdateTime");
dr[BizObject.UpdatedTime] = PageUtil.ObjToDateTime(updateTime.Text);
dr[EndoscopyPathologyFinding.ProcEndoscopyId] = Request.QueryString["parentKey"].ToString();
dr[EndoscopyPathologyFinding.EndoscopyPathFindingId] = grid.DataKeys[e.Item.ItemIndex];
dr[EndoscopyPathologyFinding.PathFindProc] = Request.Form[PathFindProc.UniqueID].ToString();
// dr[EndoscopyPathologyFinding.PathFindProc] = PathFindProc.Text;
dr[EndoscopyPathologyFinding.PathFindSide] = Request.Form[PathFindSide.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindLaterality] = Request.Form[PathFindLaterality.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindLevel] = Request.Form[PathFindLevel.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindAP] = Request.Form[PathFindAP.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindSite] = Request.Form[PathFindSite.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindPattern] = Request.Form[PathFindPattern.UniqueID].ToString();
//should be COMBOBOX
dr[EndoscopyPathologyFinding.PathFindHistology] = Request.Form[PathFindHistology.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindStageT] = PathFindStageT.Text;
//dr[EndoscopyPathologyFinding.PathFindStageT] = Request.Form[PathFindStageT.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindGrade] = Request.Form[PathFindGrade.UniqueID].ToString();
dr[EndoscopyPathologyFinding.PathFindMaxDim] = PathFindMaxDim.Text;
dr[EndoscopyPathologyFinding.PathFindNum] = PathFindNum.Text;
dr[EndoscopyPathologyFinding.PathFindMucosa] = Request.Form[PathFindMucosa.UniqueID].ToString();
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;
//make objects below lowercase to differ from above method and match Lkp Arguments
//HtmlSelect pathfindproc = (HtmlSelect) e.Item.FindControl("PathFindProc");
// TextBox pathfindproc = (TextBox) e.Item.Cells[1].Controls[0];
// pathfindproc.Width = 100;
HtmlSelect pathfindproc = (HtmlSelect) e.Item.FindControl("PathFindProc");
HtmlSelect pathfindside = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect pathfindlaterality = (HtmlSelect) e.Item.FindControl("PathFindLaterality");
HtmlSelect pathfindlevel = (HtmlSelect) e.Item.FindControl("PathFindLevel");
HtmlSelect pathfindap = (HtmlSelect) e.Item.FindControl("PathFindAP");
HtmlSelect pathfindsite = (HtmlSelect) e.Item.FindControl("PathFindSite");
HtmlSelect pathfindpattern = (HtmlSelect) e.Item.FindControl("PathFindPattern");
HtmlSelect pathfindhistology = (HtmlSelect) e.Item.FindControl("PathFindHistology");
TextBox pathfindstaget = (TextBox) e.Item.Cells[9].Controls[0];
pathfindstaget.Width = 100;
//HtmlSelect pathfindstaget = (HtmlSelect) e.Item.FindControl("PathFindStageT");
HtmlSelect pathfindgrade = (HtmlSelect) e.Item.FindControl("PathFindGrade");
TextBox pathfindmaxdim = (TextBox) e.Item.Cells[11].Controls[0];
pathfindmaxdim.Width = 100;
TextBox pathfindnum = (TextBox) e.Item.Cells[12].Controls[0];
pathfindnum.Width = 100;
HtmlSelect pathfindmucosa = (HtmlSelect) e.Item.FindControl("PathFindMucosa");
//PageUtil.SelectDropDownItem(pathfindproc, drv[EndoscopyPathologyFinding.PathFindProc].ToString());
PageUtil.FillLkpDropDown(pathfindproc, "PathFindProc");
PageUtil.SelectDropDownItem(pathfindproc, drv[EndoscopyPathologyFinding.PathFindProc].ToString());
PageUtil.FillLkpDropDown(pathfindside, "FindSide");
PageUtil.SelectDropDownItem(pathfindside, drv[EndoscopyPathologyFinding.PathFindSide].ToString());
PageUtil.FillLkpDropDown(pathfindlaterality, "Laterality");
PageUtil.SelectDropDownItem(pathfindlaterality, drv[EndoscopyPathologyFinding.PathFindLaterality].ToString());
PageUtil.FillLkpDropDown(pathfindlevel, "BladderLevel");
PageUtil.SelectDropDownItem(pathfindlevel, drv[EndoscopyPathologyFinding.PathFindLevel].ToString());
PageUtil.FillLkpDropDown(pathfindap, "AP");
PageUtil.SelectDropDownItem(pathfindap, drv[EndoscopyPathologyFinding.PathFindAP].ToString());
PageUtil.FillLkpDropDown(pathfindsite, "PathFindSiteBladder");
PageUtil.SelectDropDownItem(pathfindsite, drv[EndoscopyPathologyFinding.PathFindSite].ToString());
PageUtil.FillLkpDropDown(pathfindpattern, "PathPatternBladder");
PageUtil.SelectDropDownItem(pathfindpattern, drv[EndoscopyPathologyFinding.PathFindPattern].ToString());
PageUtil.FillLkpDropDown(pathfindhistology, "PathHistologyBladder");
PageUtil.SelectDropDownItem(pathfindhistology, drv[EndoscopyPathologyFinding.PathFindHistology].ToString());
//PageUtil.FillLkpDropDown(pathfindstaget, "BladderPathStageT");
//PageUtil.SelectDropDownItem(pathfindstaget, drv[EndoscopyPathologyFinding.PathFindStageT].ToString());
PageUtil.FillLkpDropDown(pathfindgrade, "PathGrade");
PageUtil.SelectDropDownItem(pathfindgrade, drv[EndoscopyPathologyFinding.PathFindGrade].ToString());
PageUtil.FillLkpDropDown(pathfindmucosa, "PathFindMucosa");
PageUtil.SelectDropDownItem(pathfindmucosa, drv[EndoscopyPathologyFinding.PathFindMucosa].ToString());
//
TextBox procEndoscopyId = (TextBox) e.Item.FindControl("ProcEndoscopyId");
procEndoscopyId.Text = drv[EndoscopyPathologyFinding.ProcEndoscopyId].ToString();
TextBox updateTime = (TextBox)e.Item.FindControl("UpdateTime");
updateTime.Text = drv[BizObject.UpdatedTime].ToString();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -