void btn_Click(object sender, EventArgs e) { Flow fl = new Flow(this.FK_Flow); FlowNodes fnds = new FlowNodes(); fnds.Delete(FlowNodeAttr.FK_Flow, this.FK_Flow); BP.WF.Nodes nds = fl.HisNodes; foreach (BP.WF.Node nd in nds) { CheckBox cb = this.Ucsys1.GetCBByID("CB_" + nd.NodeID); if (cb.Checked == false) { continue; } FlowNode fn = new FlowNode(); fn.FK_Flow = this.FK_Flow; fn.FK_Node = nd.NodeID; fn.Insert(); } this.Response.Redirect(this.Request.RawUrl, true); }
public void Bind() { Flow fl = new Flow(this.FK_Flow); this.Ucsys1.AddTable("width=100%"); this.Ucsys1.AddCaptionLeft("为流程:" + fl.Name + ",设置抄送节点。"); this.Ucsys1.AddTR(); this.Ucsys1.AddTDTitle("步骤"); this.Ucsys1.AddTDTitle("节点名称"); this.Ucsys1.AddTREnd(); Nodes nds = fl.HisNodes; FlowNodes fnds = new FlowNodes(); fnds.Retrieve(FlowNodeAttr.FK_Flow, this.FK_Flow); foreach (BP.WF.Node nd in nds) { this.Ucsys1.AddTR(); this.Ucsys1.AddTDIdx(nd.Step); CheckBox cb = new CheckBox(); cb.ID = "CB_" + nd.NodeID; cb.Text = nd.Name; cb.Checked = fnds.Contains(FlowNodeAttr.FK_Node, nd.NodeID); this.Ucsys1.AddTD(cb); this.Ucsys1.AddTREnd(); } this.Ucsys1.AddTRSum(); this.Ucsys1.AddTD(); Button btn = new Button(); btn.ID = "Btn_Save"; btn.Text = " 保 存 "; btn.CssClass = "Btn"; btn.Click += new EventHandler(btn_Click); this.Ucsys1.AddTD(btn); this.Ucsys1.AddTREnd(); this.Ucsys1.AddTableEnd(); }