void btn_Click(object sender, EventArgs e) { Listen li = new Listen(); if (this.RefOID != 0) { li.OID = this.RefOID; li.Retrieve(); } li = this.Pub1.Copy(li) as Listen; li.OID = this.RefOID; BP.WF.Node nd = new BP.WF.Node(this.FK_Node); BP.WF.Nodes nds = new BP.WF.Nodes(nd.FK_Flow); string strs = ""; foreach (BP.WF.Node en in nds) { if (en.NodeID == this.FK_Node) { continue; } CheckBox cb = this.Pub1.GetCBByID("CB_" + en.NodeID); if (cb.Checked) { strs += "@" + en.NodeID; } } li.Nodes = strs; li.FK_Node = this.FK_Node; if (li.OID == 0) { li.Insert(); } else { li.Update(); } var btn = (LinkBtn)sender; if (btn.ID == NamesOfBtn.Save) { this.Response.Redirect("Listen.aspx?FK_Node=" + this.FK_Node + "&DoType=New&RefOID=" + li.OID, true); } else { this.Response.Redirect("Listen.aspx?FK_Node=" + this.FK_Node + "&DoType=New&RefOID=0", true); } }