📄 rplnd_pathfindingsform.ascx.cs
字号:
namespace Caisis.UI.Modules.Testis.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 RPLND_PathFindingsForm : DataGridControl
{
override protected DataEntryController GetController()
{
return new DataGridController(new RPLND_PathFindingDa(), RPLND_PathFinding.RPLND_PathFindingId);
}
override protected void SetDataEntryInfo()
{
this._tableInfo = "RPLND_PathFindings";
this._dataEntryTitle = "<a href=\"DataEntryContainer.aspx?dataForm=ProcRPLNDsForm&parentKey="+Request.QueryString["parentKey"]+"&relationship=one\"> RPLND</a> > Pathology Findings";
}
protected override DataTable PhysicalDataRead()
{
DataGridController ct = new DataGridController(new RPLND_PathFindingDa(), RPLND_PathFinding.RPLND_PathFindingId);
DataSet ds = ct.GetDataGridRecords(int.Parse(Request.QueryString["parentKey"].ToString()));
return ds.Tables[0];
}
protected override DataSet GetGridRow(DataGridCommandEventArgs e)
{
RPLND_PathFinding biz = new RPLND_PathFinding();
DataSet ds = new DataSet();
ds.Tables.Add(biz);
DataRow dr = biz.NewRow();
HtmlSelect PathFindSide = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect PathFindSite = (HtmlSelect) e.Item.FindControl("PathFindSite");
TextBox PathFindMaxDim = (TextBox) e.Item.Cells[3].Controls[0];
PathFindMaxDim.Width = 60;
//HtmlSelect PathFindExtension = (HtmlSelect) e.Item.FindControl("PathFindExtension");
TextBox PathFindExtension = (TextBox) e.Item.Cells[4].Controls[0];
PathFindExtension.Width = 60;
TextBox PathFindPosNodes = (TextBox) e.Item.Cells[5].Controls[0];
PathFindPosNodes.Width = 60;
TextBox PathFindNumNodes = (TextBox) e.Item.Cells[6].Controls[0];
PathFindNumNodes.Width = 60;
//Changed to accept multiple histologies for a single node
TextBox PathFindHistology = (TextBox) e.Item.Cells[7].Controls[0];
PathFindHistology.Width = 100;
//HtmlSelect PathFindHistology = (HtmlSelect) e.Item.FindControl("PathFindHistology");
TextBox updateTime = (TextBox) e.Item.FindControl("UpdateTime");
dr[BizObject.UpdatedTime] = PageUtil.ObjToDateTime(updateTime.Text);
dr[ProstatectomyPathologyFinding.SurgeryId] = Request.QueryString["parentKey"].ToString();
dr[RPLND_PathFinding.RPLND_PathFindingId] = grid.DataKeys[e.Item.ItemIndex];
dr[RPLND_PathFinding.PathFindSide] = Request.Form[PathFindSide.UniqueID].ToString();
dr[RPLND_PathFinding.PathFindSite] = Request.Form[PathFindSite.UniqueID].ToString();
dr[RPLND_PathFinding.PathFindMaxDim] = PathFindMaxDim.Text;
//dr[RPLND_PathFinding.PathFindExtension] = Request.Form[PathFindExtension.UniqueID].ToString();
dr[RPLND_PathFinding.PathFindExtension] = PathFindExtension.Text;
dr[RPLND_PathFinding.PathFindPosNodes] = PathFindPosNodes.Text;
dr[RPLND_PathFinding.PathFindNumNodes] = PathFindNumNodes.Text;
//should be COMBOBOX
dr[RPLND_PathFinding.PathFindHistology] = PathFindHistology.Text;
//dr[RPLND_PathFinding.PathFindHistology] = Request.Form[PathFindHistology.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;
HtmlSelect pathfindside = (HtmlSelect) e.Item.FindControl("PathFindSide");
HtmlSelect pathfindsite = (HtmlSelect) e.Item.FindControl("PathFindSite");
TextBox pathfindmaxdim = (TextBox) e.Item.Cells[3].Controls[0];
pathfindmaxdim.Width = 100;
TextBox pathfindextension = (TextBox) e.Item.Cells[4].Controls[0];
pathfindextension.Width = 100;
//HtmlSelect pathfindextension = (HtmlSelect) e.Item.FindControl("PathFindExtension");
TextBox pathfindposnodes = (TextBox) e.Item.Cells[5].Controls[0];
pathfindposnodes.Width = 100;
TextBox pathfindnumnodes = (TextBox) e.Item.Cells[6].Controls[0];
pathfindnumnodes.Width = 100;
TextBox pathfindhistology = (TextBox) e.Item.Cells[7].Controls[0];
pathfindhistology.Width = 160;
//HtmlSelect pathfindhistology = (HtmlSelect) e.Item.FindControl("PathFindHistology");
PageUtil.FillLkpDropDown(pathfindside, "FindSide");
PageUtil.SelectDropDownItem(pathfindside, drv[RPLND_PathFinding.PathFindSide].ToString());
PageUtil.FillLkpDropDown(pathfindsite, "PathFindSiteTestis");
PageUtil.SelectDropDownItem(pathfindsite, drv[RPLND_PathFinding.PathFindSite].ToString());
//PageUtil.FillLkpDropDown(pathfindextension, "Extension");
//PageUtil.SelectDropDownItem(pathfindextension, drv[RPLND_PathFinding.PathFindExtension].ToString());
//PageUtil.FillLkpDropDown(pathfindhistology, "PathHistologyNodes");
//PageUtil.SelectDropDownItem(pathfindhistology, drv[RPLND_PathFinding.PathFindHistology].ToString());
TextBox fkId = (TextBox) e.Item.FindControl("SurgeryId");
fkId.Text = drv[RPLND_PathFinding.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 + -