protected void Page_Load(object sender, EventArgs e) { this.Title = "枚举值编辑"; if (this.DoType == "Del") { MapAttrs attrs = new MapAttrs(); attrs.Retrieve(MapAttrAttr.UIBindKey, this.RefNo); this.UCSys1.AddEasyUiPanelInfoBegin("删除确认", "icon-delete"); if (attrs.Count != 0) { //this.UCSys1.AddFieldSet("<a href='EnumList.aspx' ><img src='./../../Img/Btn/Home.gif' border=0/>返回列表</a> - 删除确认"); //this.UCSys1.Add("此枚举值已经被其它的字段所引用,您不能删除它。"); //this.UCSys1.AddH2("<a href='EnumList.aspx' >返回列表</a>"); //this.UCSys1.AddFieldSetEnd(); this.UCSys1.Add("<b>此枚举值已经被其它的字段所引用,您不能删除它。</b>"); this.UCSys1.Add("<a class='easyui-linkbutton' data-options=\"iconCls:'icon-back'\" href='EnumList.aspx?T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "' >返回列表</a>"); this.UCSys1.AddEasyUiPanelInfoEnd(); return; } //this.UCSys1.AddFieldSet("<a href='EnumList.aspx' ><img src='./../../Img/Btn/Home.gif' border=0/>返回列表</a> - 删除确认"); SysEnumMain m = new SysEnumMain(this.RefNo); this.UCSys1.AddEasyUiLinkButton("确定删除:" + m.Name + "?", "EnumList.aspx?RefNo=" + this.RefNo + "&DoType=DelReal&T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff"), "icon-delete"); this.UCSys1.AddSpace(1); this.UCSys1.AddEasyUiLinkButton("取消", "EnumList.aspx?T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff"), "icon-undo"); this.UCSys1.AddEasyUiPanelInfoEnd(); return; } if (this.DoType == "DelReal") { SysEnumMain m = new SysEnumMain(); m.No = this.RefNo; m.Delete(); SysEnums ses = new SysEnums(); ses.Delete(SysEnumAttr.EnumKey, this.RefNo); //this.Response.Redirect("EnumList.aspx", true); this.Response.Redirect("EnumList.aspx?T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff"), true); return; } if (this.DoType == "New") { this.BindNew(); return; } if (this.RefNo != null) { this.BindRefNo(); return; } //this.UCSys1.AddTable(); //this.UCSys1.AddCaptionLeftTX("<img src='./../../Img/Btn/Home.gif' border=0/>列表 - <a href='EnumList.aspx?DoType=New' ><img border=0 src='./../../Img/Btn/New.gif' >新建</a>"); this.UCSys1.AddTableNormal(); this.UCSys1.AddTRGroupTitle(5, "<b>列表</b> - <a href='EnumList.aspx?DoType=New&T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "'>新建</a>"); this.UCSys1.AddTR(); this.UCSys1.AddTDGroupTitleCenter("序"); this.UCSys1.AddTDGroupTitle("编号"); this.UCSys1.AddTDGroupTitle("名称"); this.UCSys1.AddTDGroupTitle("信息"); this.UCSys1.AddTDGroupTitle("操作"); this.UCSys1.AddTREnd(); SysEnumMains sems = new SysEnumMains(); sems.RetrieveAll(); int i = 0; foreach (SysEnumMain se in sems) { i++; //this.UCSys1.AddTR(); this.UCSys1.AddTR(i % 2 == 0); this.UCSys1.AddTDIdx(i); this.UCSys1.AddTD(se.No); this.UCSys1.AddTDA("EnumList.aspx?RefNo=" + se.No + "&T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff"), se.Name); this.UCSys1.AddTD(se.CfgVal); //this.UCSys1.AddTDA("EnumList.aspx?RefNo=" + se.No + "&DoType=Del", "<img src='./../../Img/Btn/Delete.gif' border=0 />删除"); this.UCSys1.AddTDBegin(); this.UCSys1.AddEasyUiLinkButton("删除", "EnumList.aspx?RefNo=" + se.No + "&DoType=Del&T=" + DateTime.Now.ToString("yyyyMMddHHmmssfff"), "icon-delete"); this.UCSys1.AddTDEnd(); this.UCSys1.AddTREnd(); } this.UCSys1.AddTableEnd(); }
protected void Page_Load(object sender, EventArgs e) { this.Title = "枚举值编辑"; if (this.DoType == "Del") { MapAttrs attrs = new MapAttrs(); attrs.Retrieve(MapAttrAttr.UIBindKey, this.RefNo); if (attrs.Count != 0) { this.UCSys1.AddFieldSet("<a href='EnumList.aspx' ><img src='./../../Img/Btn/Home.gif' border=0/>返回列表</a> - 删除确认"); this.UCSys1.Add("此枚举值已经被其它的字段所引用,您不能删除它。"); this.UCSys1.AddH2("<a href='EnumList.aspx' >返回列表</a>"); this.UCSys1.AddFieldSetEnd(); return; } this.UCSys1.AddFieldSet("<a href='EnumList.aspx' ><img src='./../../Img/Btn/Home.gif' border=0/>返回列表</a> - 删除确认"); SysEnumMain m = new SysEnumMain(this.RefNo); this.UCSys1.AddH2("<a href='EnumList.aspx?RefNo=" + this.RefNo + "&DoType=DelReal' >删除:" + m.Name + " 确认.</a>"); this.UCSys1.AddFieldSetEnd(); return; } if (this.DoType == "DelReal") { SysEnumMain m = new SysEnumMain(); m.No = this.RefNo; m.Delete(); SysEnums ses = new SysEnums(); ses.Delete(SysEnumAttr.EnumKey, this.RefNo); this.Response.Redirect("EnumList.aspx", true); return; } if (this.DoType == "New") { this.BindNew(); return; } if (this.RefNo != null) { this.BindRefNo(); return; } this.UCSys1.AddTable(); this.UCSys1.AddCaptionLeftTX("<img src='./../../Img/Btn/Home.gif' border=0/>列表 - <a href='EnumList.aspx?DoType=New' ><img border=0 src='./../../Img/Btn/New.gif' >新建</a>"); this.UCSys1.AddTR(); this.UCSys1.AddTDTitle("序"); this.UCSys1.AddTDTitle("编号"); this.UCSys1.AddTDTitle("名称"); this.UCSys1.AddTDTitle("信息"); this.UCSys1.AddTDTitle("操作"); this.UCSys1.AddTREnd(); SysEnumMains sems = new SysEnumMains(); sems.RetrieveAll(); int i = 0; foreach (SysEnumMain se in sems) { i++; this.UCSys1.AddTR(); this.UCSys1.AddTDIdx(i); this.UCSys1.AddTD(se.No); this.UCSys1.AddTDA("EnumList.aspx?RefNo=" + se.No, se.Name); this.UCSys1.AddTD(se.CfgVal); this.UCSys1.AddTDA("EnumList.aspx?RefNo=" + se.No + "&DoType=Del", "<img src='./../../Img/Btn/Delete.gif' border=0 />删除"); this.UCSys1.AddTREnd(); } this.UCSys1.AddTableEnd(); }