/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Btn_Save_Click(object sender, EventArgs e) { int nodeID = int.Parse(this.FK_Node.ToString()); BP.Sys.MapAttrs attrs = new BP.Sys.MapAttrs("ND" + nodeID); BP.WF.Node nd = new BP.WF.Node(nodeID); //遍历页面radiobutton if (this.RB_CCFlowMsg.Checked) { nd.HisTurnToDeal = BP.WF.TurnToDeal.CCFlowMsg; } else if (this.RB_SpecMsg.Checked) { nd.HisTurnToDeal = BP.WF.TurnToDeal.SpecMsg; nd.TurnToDealDoc = this.TB_SpecMsg.Text; } else { nd.HisTurnToDeal = BP.WF.TurnToDeal.SpecUrl; nd.TurnToDealDoc = this.TB_SpecURL.Text; } //执行保存操作 nd.Update(); BP.Sys.PubClass.Alert("保存成功."); }
/// <summary> /// 06.按上一节点表单指定的字段值作为本步骤的接受人 参数: 请在上一节点表单创建SysSendEmps文本框. /// </summary> public void bindDDL_5() { string str = this.NodeID.ToString().Substring(0, this.NodeID.ToString().Length - 2); BP.Sys.MapAttrs attrs = new BP.Sys.MapAttrs("ND" + str + "Rpt"); foreach (BP.Sys.MapAttr item in attrs) { if (item.UIVisible == false) { continue; } this.DDL_ByPreviousNodeFormEmpsField.Items.Add(new ListItem(item.KeyOfEn + " " + item.Name, item.KeyOfEn)); } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Btn_Save_Click(object sender, EventArgs e) { int nodeID = int.Parse(this.FK_Node.ToString()); BP.Sys.MapAttrs attrs = new BP.Sys.MapAttrs("ND" + nodeID); BP.WF.Node nd = new BP.WF.Node(nodeID); //给变量赋值. //批处理的类型 int selectval = int.Parse(this.DDL_BRole.SelectedValue.ToString()); switch (selectval) { case 0: nd.HisBatchRole = BP.WF.BatchRole.None; break; case 1: nd.HisBatchRole = BP.WF.BatchRole.Ordinary; break; default: nd.HisBatchRole = BP.WF.BatchRole.Group; break; } //批处理的数量 nd.BatchListCount = int.Parse(this.TB_Num.Text); //批处理的参数 string sbatchparas = ""; if (Request["CB_Node"] != null) { sbatchparas = Request["CB_Node"].ToString(); } nd.BatchParas = sbatchparas; nd.Update(); BP.Sys.PubClass.Alert("保存成功."); }
/// <summary> /// 页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int nodeID = int.Parse(this.FK_Node.ToString()); BP.Sys.MapAttrs attrs = new BP.Sys.MapAttrs("ND" + nodeID); BP.WF.Node nd = new BP.WF.Node(nodeID); this.TB_Num.Text = nd.BatchListCount.ToString(); //动态为 批处理赋值 和默认参数 string srole = ""; if (nd.HisBatchRole.ToString() == "None") { srole = "0"; } else if (nd.HisBatchRole.ToString() == "Ordinary") { srole = "1"; } else { srole = "2"; } BP.Sys.SysEnums ses = new BP.Sys.SysEnums(BP.WF.Template.NodeAttr.BatchRole); foreach (BP.Sys.SysEnum item in ses) { this.DDL_BRole.Items.Add(new ListItem(item.Lab, item.IntKey.ToString())); if (item.IntKey.ToString() == srole) { this.DDL_BRole.Items[int.Parse(srole)].Selected = true; } } } }
protected void Page_Load(object sender, EventArgs e) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); //判断节点消息事件类型, switch (this.FK_Event) { case BP.Sys.EventListOfNode.WorkArrive: //1.节点到达时 this.RB_Email_1.Text = "发送给当前节点的所有处理人"; this.RB_SMS_1.Text = "发送给当前节点的所有处理人"; break; case BP.Sys.EventListOfNode.SendSuccess: //2.节点发送成功时 this.RB_Email_1.Text = "发送给下一个节点的所有接受人"; this.RB_SMS_1.Text = "发送给下一个节点的所有接受人"; break; case BP.Sys.EventListOfNode.ReturnAfter: //3.节点退回后 this.RB_Email_1.Text = "发送给被退回的节点处理人."; this.RB_SMS_1.Text = "发送给被退回的节点处理人"; break; case BP.Sys.EventListOfNode.UndoneAfter: //4.工作撤销后 this.RB_Email_1.Text = "撤销工作后通知的节点接受人"; this.RB_SMS_1.Text = "撤销工作后通知的节点接受人";; break; case BP.Sys.EventListOfNode.FlowOverAfter: //6.流程结束后 this.RB_Email_1.Text = "流程结束后通知的节点接受人"; this.RB_SMS_1.Text = "流程结束通知的节点接受人"; break; case BP.Sys.EventListOfNode.AfterFlowDel: //7.流程删除后 this.RB_Email_1.Text = "流程删除后通知的节点接受人"; this.RB_SMS_1.Text = "流程删除通知的节点接受人"; break; } if (this.IsPostBack == true) { return; } BP.WF.Template.PushMsg msg = new BP.WF.Template.PushMsg(); msg.MyPK = this.MyPK; msg.FK_Event = this.FK_Event; msg.FK_Node = this.FK_Node; if (msg.RetrieveFromDBSources() == 0 && (this.FK_Event == BP.Sys.EventListOfNode.SendSuccess || this.FK_Event == BP.Sys.EventListOfNode.ReturnAfter)) { /*如果是发送成功的消息没有被查询到. */ msg.MailPushWay = 1; msg.SMSPushWay = 0; } #region 设置字段下拉框. BP.Sys.MapAttrs attrs = new BP.Sys.MapAttrs(); int i = attrs.Retrieve(BP.Sys.MapAttrAttr.FK_MapData, "ND" + FK_Node); foreach (BP.Sys.MapAttr item in attrs) { if (item.LGType != BP.En.FieldTypeS.Normal) { continue; } if (item.MyDataType != BP.DA.DataType.AppString) { continue; } switch (item.KeyOfEn) { case BP.WF.GEWorkAttr.Emps: case BP.WF.GEWorkAttr.MD5: case BP.WF.GEWorkAttr.Rec: case BP.WF.GEWorkAttr.RecText: break; default: break; } this.DDL_SMS_Fields.Items.Add(new ListItem(item.KeyOfEn + " ; " + item.Name, item.KeyOfEn)); this.DDL_Email.Items.Add(new ListItem(item.KeyOfEn + " ; " + item.Name, item.KeyOfEn)); } #endregion 设置字段下拉框. #region 短信内容设置。 if (msg.SMSPushWay == 0) { this.RB_SMS_0.Checked = true; } if (msg.SMSPushWay == 1) { this.RB_SMS_1.Checked = true; } if (msg.SMSPushWay == 2) { this.RB_SMS_2.Checked = true; } if (msg.SMSPushWay == 3) { this.RB_SMS_3.Checked = true; } this.TB_SMS.Text = msg.SMSDoc; this.DDL_SMS_Fields.SelectedValue = msg.SMSField; #endregion #region 邮件内容设置。 if (msg.MailPushWay == 0) { this.RB_Email_0.Checked = true; } if (msg.MailPushWay == 1) { this.RB_Email_1.Checked = true; } if (msg.MailPushWay == 2) { this.RB_Email_2.Checked = true; } if (msg.MailPushWay == 3) { this.RB_Email_3.Checked = true; } this.TB_Email_Title.Text = msg.MailTitle; this.TB_Email_Doc.Text = msg.MailDoc; this.DDL_Email.SelectedValue = msg.MailAddress; #endregion 邮件内容设置 #region 绑定节点. BP.WF.Nodes nds = new BP.WF.Nodes(nd.FK_Flow); foreach (BP.WF.Node mynd in nds) { CheckBox cb = new CheckBox(); cb.ID = "CB_SMS_" + mynd.NodeID; cb.Text = mynd.Name; cb.Checked = msg.SMSNodes.Contains(mynd.NodeID + ""); this.Pub1.Add(cb); CheckBox cb2 = new CheckBox(); cb2.ID = "CB_Email_" + mynd.NodeID; cb2.Text = mynd.Name; cb2.Checked = msg.MailNodes.Contains(mynd.NodeID + ""); this.Pub2.Add(cb2); } #endregion 绑定节点 }