📄 procpancreaspathform.ascx.cs
字号:
dr[PancreasPathology.PathPancreatitis] = Request.Form[PathPancreatitis.UniqueID].ToString();
dr[PancreasPathology.PathFibrosis] = Request.Form[PathFibrosis.UniqueID].ToString();
dr[PancreasPathology.PathDuodenum] = Request.Form[PathDuodenum.UniqueID].ToString();
dr[PancreasPathology.PathStomach] = Request.Form[PathStomach.UniqueID].ToString();
dr[PancreasPathology.PathPanIn] = Request.Form[PathPanIn.UniqueID].ToString();
AddBaseParams(dr);
biz.Tables[PancreasPathology.Table_ProcPancreasPath].Rows.Add(dr);
biz.AcceptChanges();
return biz;
}
protected override void SetFields(BizObject bz)
{
PancreasPathology biz = (PancreasPathology) bz;
DataRow dr = biz.Tables[PancreasPathology.Table_ProcPancreasPath].Rows[0];
//selects use: PageUtil.SelectDropDownItem(fieldIdName, dr[Object.FieldName]);
SurgeryId.Value = dr[PancreasPathology.SurgeryId].ToString();
PathNum.Value = dr[PancreasPathology.PathNum].ToString();
PageUtil.SelectDropDownItem(PathStageSystem, dr[PancreasPathology.PathStageSystem]);
PageUtil.SelectDropDownItem(PathPNI, dr[PancreasPathology.PathPNI]);
PageUtil.SelectDropDownItem(PathVascularInv, dr[PancreasPathology.PathVascularInv]);
Pathologist.Value = dr[PancreasPathology.Pathologist].ToString();
PathNotes.Value = dr[PancreasPathology.PathNotes].ToString();
PageUtil.SelectDropDownItem(PathSite, dr[PancreasPathology.PathSite]);
PageUtil.SelectDropDownItem(PathSubSite, dr[PancreasPathology.PathSubSite]);
PageUtil.SelectDropDownItem(PathQuality, dr[PancreasPathology.PathQuality]);
PageUtil.SelectDropDownItem(PathHistology, dr[PancreasPathology.PathHistology]);
PageUtil.SelectDropDownItem(PathSecondaryHistology, dr[PancreasPathology.PathSecondaryHistology]);
PageUtil.SelectDropDownItem(PathGrade, dr[PancreasPathology.PathGrade]);
PageUtil.SelectDropDownItem(PathExtraParenchymalInv, dr[PancreasPathology.PathExtraParenchymalInv]);
PageUtil.SelectDropDownItem(PathPancreaticMargin, dr[PancreasPathology.PathPancreaticMargin]);
//PageUtil.SelectDropDownItem(PathAnteriorMargin, dr[PancreasPathology.PathAnteriorMargin]);
PageUtil.SelectDropDownItem(PathPosteriorMargin, dr[PancreasPathology.PathPosteriorMargin]);
PageUtil.SelectDropDownItem(PathDuodenalMargin, dr[PancreasPathology.PathDuodenalMargin]);
PageUtil.SelectDropDownItem(PathGastricMargin, dr[PancreasPathology.PathGastricMargin]);
PageUtil.SelectDropDownItem(PathBileDuctMargin, dr[PancreasPathology.PathBileDuctMargin]);
PageUtil.SelectDropDownItem(PathAnteriorPeritonealInv, dr[PancreasPathology.PathAnteriorPeritonealInv]);
PageUtil.SelectDropDownItem(PathPancreatitis, dr[PancreasPathology.PathPancreatitis]);
PageUtil.SelectDropDownItem(PathFibrosis, dr[PancreasPathology.PathFibrosis]);
PageUtil.SelectDropDownItem(PathDuodenum, dr[PancreasPathology.PathDuodenum]);
PageUtil.SelectDropDownItem(PathStomach, dr[PancreasPathology.PathStomach]);
PageUtil.SelectDropDownItem(PathPanIn, dr[PancreasPathology.PathPanIn]);
SetBaseFields(dr);
//SetSubPageLinks();
SetStageSelects();
PageUtil.SelectDropDownItem(PathStageT, dr[PancreasPathology.PathStageT]);
PageUtil.SelectDropDownItem(PathStageSystem, dr[PancreasPathology.PathStageSystem]);
}
protected override void SetStageSelects()
{
string selectedPathStageSystem;
string trimSelectedPathStageSystem;
if (Request.Form[PathStageSystem.UniqueID] != null && Request.Form[PathStageSystem.UniqueID] != "")
{
selectedPathStageSystem = Request.Form[PathStageSystem.UniqueID];
}
else
{
selectedPathStageSystem = PathStageSystem.Value;
}
// PageUtil.SelectDropDownItem(PathStageSystem, selectedPathStageSystem);
if (selectedPathStageSystem.StartsWith("UICC_").Equals(true))
{
trimSelectedPathStageSystem = selectedPathStageSystem.Remove(0, 4);
}
else
{
trimSelectedPathStageSystem = "_" + selectedPathStageSystem;
}
string stageLkp = "PancreasPathStageT" + trimSelectedPathStageSystem;
PageUtil.FillLkpDropDown(PathStageT, stageLkp, ViewState);
// logic to turn off TM stages if Stage System not selected not working currently. leave on for now.
/* if (PathStageSystem.Disabled.Equals(false) && selectedPathStageSystem != null && selectedPathStageSystem.Length > 0)
{
PathStageT.Disabled = false;
}
else
{
PathStageT.Disabled = true;
}
*/
if (PathStageSystem.Disabled.Equals(false))
{
PathStageT.Disabled = false;
}
else
{
PathStageT.Disabled = true;
}
ActivateStagingInfo(stageLkp);
}
protected void FillStagingInfo(string fieldName)
{
DataTable dt = PageUtil.RetrieveList(fieldName);
if (dt.Rows.Count < 1)
{
DataRow blankRow = dt.NewRow();
dt.Rows.Add(blankRow);
dt.Rows[0]["LkpDescription"] = "You must select a staging system to view available options.";
}
else
{
rptStages.DataSource = dt.DefaultView;
rptStages.DataBind();
}
}
protected void ActivateStagingInfo(string stageLkp)
{
if (PathStageSystem.Disabled.Equals(false))
{
if (PathStageT.Disabled.Equals(false))
{
FillStagingInfo(stageLkp);
StagingInfoLink.Attributes.Add("style", "cursor: hand;");
StagingInfoLink.Attributes.Add("onclick", "ShowStagingInfo();");
}
else
{
StagingInfoLink.Attributes.Add("onclick", "RequestStagingSystem();");
}
}
}
protected void StagingInfoDataBound(Object Sender, RepeaterItemEventArgs e)
{
System.Web.UI.HtmlControls.HtmlAnchor tStageLink;
tStageLink = (HtmlAnchor) e.Item.FindControl("tStageLink");
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
int linkIndex = e.Item.ItemIndex + 1;
tStageLink.Attributes.Add("onclick", "MM_showHideLayers('stagingInfoDiv','','hide'); setStageSelectValue('" + PathStageT.ClientID + "', " + linkIndex.ToString() + ");");
// tStageRadio.Name = "tStageRadio";
// tStageRadio.Value = e.Item.ItemIndex.ToString();
}
}
// need to turn staging wizard off if cancel is clicked
public override void DisableFormFields()
{
base.DisableFormFields();
StagingInfoLink.Attributes.Clear();
}
public override void PopulateForm(BizObject bz)
{
//only setFields if GetRecords actually returns at least one row, primKey may exist because passed down from parent record in one to one relationship
if (bz != null && bz.Tables[0].Rows.Count != 0)
{
base.PopulateForm(bz);
}
else
{
ResetFormFields();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -