/// <summary> /// 插入之后 /// </summary> protected override void afterInsert() { GroupField gf = new GroupField(); if (gf.IsExit(GroupFieldAttr.CtrlID, this.MyPK) == false) { gf.FrmID = this.FK_MapData; gf.CtrlID = this.MyPK; gf.CtrlType = "Ath"; gf.Lab = this.Name; gf.Idx = 0; gf.Insert(); //插入. } base.afterInsert(); }
protected void Page_Load(object sender, EventArgs e) { this.Title = "字段分组"; switch (this.DoType) { case "FunList": this.Pub1.AddFieldSet("字段分组向导"); this.Pub1.AddUL(); this.Pub1.AddLi("<b><a href='GroupField.aspx?DoType=NewGroup&RefNo=" + this.RefNo + "'>新建空白字段分组</a></b><br><font color=green>空白字段分组,建立后可以把相关的字段放入此分组里。</font>"); this.Pub1.AddLi("<b><a href='GroupField.aspx?DoType=NewCheckGroup&RefNo=" + this.RefNo + "'>新建审核分组</a></b><br><font color=green>系统会让您输入审核的信息,并创建审核分组。</font>"); this.Pub1.AddLi("<b><a href='GroupField.aspx?DoType=NewEvalGroup&RefNo=" + this.RefNo + "'>创建工作质量考核字段分组</a></b><br><font color=green>创建质量考核: EvalEmpNo,EvalEmpName,EvalCent,EvalNote 4个必要的字段。</font>"); this.Pub1.AddULEnd(); this.Pub1.AddFieldSetEnd(); return; case "NewCheckGroup": this.Pub1.AddFieldSet("<a href=GroupField.aspx?DoType=FunList&RefNo=" + this.RefNo + " >字段分组向导</a> - " + "审核分组"); TB tbc = new TB(); tbc.ID = "TB_Sta"; this.Pub1.Add("审核岗位<font color=red>*</font>"); this.Pub1.Add(tbc); this.Pub1.AddBR("<font color=green>比如:分局长审核、科长审核、总经理审核。</font>"); this.Pub1.AddBR(); tbc = new TB(); tbc.ID = "TB_Prx"; this.Pub1.Add("字段前缀:"); this.Pub1.Add(tbc); this.Pub1.AddBR("<font color=green>用于自动创建字段,请输入英文字母或者字母数字组合。系统自动依据您的输入产生字段。如:XXX_Note,审核意见。XXX_RDT审核时间。XXX_Checker审核人,为空系统自动用拼音表示。</font>"); this.Pub1.AddBR(); this.Pub1.AddHR(); Btn btnc = new Btn(); btnc.Click += new EventHandler(btn_Check_Click); btnc.Text = "保存"; this.Pub1.Add(btnc); this.Pub1.AddFieldSetEnd(); return; case "NewEvalGroup": GroupField gf = new GroupField(); gf.Lab = "工作质量考核"; gf.EnName = this.RefNo; gf.Insert(); MapAttr attr = new MapAttr(); attr.FK_MapData = this.RefNo; attr.KeyOfEn = BP.WF.WorkSysFieldAttr.EvalNote; attr.Name = "审核意见"; attr.MyDataType = DataType.AppString; attr.UIContralType = UIContralType.TB; attr.UIIsEnable = true; attr.UIIsLine = true; attr.MaxLen = 500; attr.GroupID = gf.OID; attr.UIHeight = 23; attr.ColSpan = 4; attr.Idx = 1; attr.Insert(); attr = new MapAttr(); attr.FK_MapData = this.RefNo; attr.KeyOfEn = BP.WF.WorkSysFieldAttr.EvalCent; attr.Name = "分值"; attr.MyDataType = DataType.AppFloat; attr.UIContralType = UIContralType.TB; attr.MaxLen = 50; attr.MinLen = 0; attr.UIIsEnable = true; attr.UIIsLine = false; attr.DefVal = "0"; attr.UIIsEnable = false; attr.GroupID = gf.OID; attr.IsSigan = true; attr.Idx = 2; attr.Insert(); attr = new MapAttr(); attr.FK_MapData = this.RefNo; attr.KeyOfEn = BP.WF.WorkSysFieldAttr.EvalEmpNo; attr.Name = "被评估人编号"; attr.MyDataType = DataType.AppString; attr.UIContralType = UIContralType.TB; attr.UIIsEnable = true; attr.UIIsLine = false; attr.DefVal = ""; attr.UIIsEnable = false; attr.GroupID = gf.OID; attr.Idx = 3; attr.Insert(); attr = new MapAttr(); attr.FK_MapData = this.RefNo; attr.KeyOfEn = BP.WF.WorkSysFieldAttr.EvalEmpName; attr.Name = "被评估人名称"; attr.MyDataType = DataType.AppString; attr.UIContralType = UIContralType.TB; attr.UIIsEnable = true; attr.UIIsLine = false; attr.DefVal = ""; attr.UIIsEnable = false; attr.GroupID = gf.OID; attr.Idx = 4; attr.Insert(); this.WinCloseWithMsg("保存成功"); // "增加成功,您可以调整它的位置与修改字段的标签。" return; case "NewGroup": GroupFields mygfs = new GroupFields(this.RefNo); GroupField gf1 = new GroupField(); gf1.Idx = mygfs.Count; gf1.Lab = "新建字段分组"; // "新建字段分组"; gf1.EnName = this.RefNo; if (gf1.IsExit(GroupFieldAttr.EnName, gf1.EnName, GroupFieldAttr.Lab, gf1.Lab) == false) { gf1.Insert(); } this.Response.Redirect("GroupField.aspx?RefNo=" + this.RefNo + "&RefOID=" + gf1.OID, true); return; default: break; } #region edit operation GroupField en = new GroupField(this.RefOID); this.Pub1.Add("<Table border=0 align=center>"); this.Pub1.AddCaptionLeft("字段分组"); this.Pub1.AddTR(); this.Pub1.AddTD("分组名称"); TB tb = new TB(); tb.ID = "TB_Lab_" + en.OID; tb.Text = en.Lab; tb.Columns = 50; this.Pub1.AddTD(tb); this.Pub1.AddTREnd(); this.Pub1.AddTRSum(); this.Pub1.Add("<TD align=center colspan=2>"); Btn btn = new Btn(); btn.Text = "保存"; btn.ID = "Btn_Save"; btn.Click += new EventHandler(btn_Click); this.Pub1.Add(btn); btn = new Btn(); btn.Text = "保存并关闭"; btn.ID = "Btn_SaveAndClose"; btn.Click += new EventHandler(btn_Click); this.Pub1.Add(btn); btn = new Btn(); btn.Text = "新建字段"; btn.ID = "Btn_NewField"; btn.Click += new EventHandler(btn_Click); this.Pub1.Add(btn); //btn = new Btn(); //btn.Text = this.ToE("CopyField", "复制字段"); //btn.ID = "Btn_CopyField"; //btn.Click += new EventHandler(btn_Click); //this.Pub1.Add(btn); btn = new Btn(); btn.Text = "删除"; btn.ID = "Btn_Delete"; btn.Click += new EventHandler(btn_del_Click); btn.Attributes["onclick"] = " return confirm('您确认吗?');"; this.Pub1.Add(btn); this.Pub1.Add("</TD>"); this.Pub1.AddTREnd(); this.Pub1.AddTableEnd(); this.Pub1.Add("把相近的字段放在一个大单元格里,只是为了显示所用没有任何计算意义。"); #endregion }
protected override bool beforeUpdate() { GroupField gf = new GroupField(); #region 审核组件. FrmWorkCheck fwc = new FrmWorkCheck(this.NodeID); fwc.Copy(this); if (fwc.HisFrmWorkCheckSta == FrmWorkCheckSta.Disable) { gf.Delete(GroupFieldAttr.FrmID, this.No, GroupFieldAttr.CtrlType, GroupCtrlType.FWC); } else { if (gf.IsExit(GroupFieldAttr.FrmID, this.No, GroupFieldAttr.CtrlType, GroupCtrlType.FWC) == false) { gf = new GroupField(); gf.FrmID = "ND" + this.NodeID; gf.CtrlType = GroupCtrlType.FWC; gf.Lab = "审核组件"; gf.Idx = 0; gf.Insert(); //插入. } } #endregion 审核组件. #region 父子流程组件. FrmSubFlow subflow = new FrmSubFlow(this.NodeID); subflow.Copy(this); if (subflow.HisFrmSubFlowSta == FrmSubFlowSta.Disable) { gf.Delete(GroupFieldAttr.CtrlID, "SubFlow" + this.No); } else { if (gf.IsExit(GroupFieldAttr.CtrlID, "SubFlow" + this.No) == false) { gf = new GroupField(); gf.FrmID = "ND" + this.NodeID; gf.CtrlID = "SubFlow" + this.No; gf.CtrlType = GroupCtrlType.SubFlow; gf.Lab = "父子流程组件"; gf.Idx = 0; gf.Insert(); //插入. } } #endregion 父子流程组件. #region 处理轨迹组件. FrmTrack track = new FrmTrack(this.NodeID); track.Copy(this); if (track.FrmTrackSta == FrmTrackSta.Disable) { gf.Delete(GroupFieldAttr.CtrlID, "FrmTrack" + this.No); } else { if (gf.IsExit(GroupFieldAttr.CtrlID, "FrmTrack" + this.No) == false) { gf = new GroupField(); gf.FrmID = "ND" + this.NodeID; gf.CtrlID = "FrmTrack" + this.No; gf.CtrlType = GroupCtrlType.Track; gf.Lab = "轨迹"; gf.Idx = 0; gf.Insert(); //插入. } } #endregion 处理轨迹组件. #region 子线程组件. FrmThread thread = new FrmThread(this.NodeID); thread.Copy(this); if (thread.FrmThreadSta == FrmThreadSta.Disable) { gf.Delete(GroupFieldAttr.CtrlID, "FrmThread" + this.No); } else { if (gf.IsExit(GroupFieldAttr.CtrlID, "FrmThread" + this.No) == false) { gf = new GroupField(); gf.EnName = "ND" + this.NodeID; gf.CtrlID = "FrmThread" + this.No; gf.CtrlType = GroupCtrlType.Thread; gf.Lab = "子线程"; gf.Idx = 0; gf.Insert(); //插入. } } #endregion 子线程组件. #region 流转自定义组件. FrmTransferCustom ftc = new FrmTransferCustom(this.NodeID); ftc.Copy(this); if (ftc.FTCSta == FTCSta.Disable) { gf.Delete(GroupFieldAttr.CtrlID, "FrmFTC" + this.No); } else { if (gf.IsExit(GroupFieldAttr.CtrlID, "FrmFTC" + this.No) == false) { gf = new GroupField(); gf.FrmID = "ND" + this.NodeID; gf.CtrlID = "FrmFTC" + this.No; gf.CtrlType = GroupCtrlType.FTC; gf.Lab = "流转自定义"; gf.Idx = 0; gf.Insert(); //插入. } } #endregion 流转自定义组件. return(base.beforeUpdate()); }