protected void Btn_Save_Click(object sender, EventArgs e) { //执行保存. BP.WF.Node nd = new BP.WF.Node(this.FK_Node); nd.TSpanDay = int.Parse(this.TB_TSpanDay.Text); nd.TSpanHour = float.Parse(this.TB_TSpanDay.Text); nd.WarningHour = float.Parse(this.TB_WarningHour.Text); nd.WarningDay = float.Parse(this.TB_WarningDay.Text); nd.TCent = int.Parse(this.TB_TCent.Text); nd.TAlertRole = (BP.WF.CHAlertRole) int.Parse(this.DDL_TAlertRole.SelectedValue); nd.TAlertWay = (BP.WF.CHAlertWay) int.Parse(this.DDL_TAlertWay.SelectedValue); nd.WAlertRole = (BP.WF.CHAlertRole) int.Parse(this.DDL_WAlertRole.SelectedValue); nd.WAlertWay = (BP.WF.CHAlertWay) int.Parse(this.DDL_WAlertWay.SelectedValue); if (this.RB_None.Checked) { nd.HisCHWay = BP.WF.CHWay.None; } if (this.RB_ByTime.Checked) { nd.HisCHWay = BP.WF.CHWay.ByTime; } if (this.RB_ByWorkNum.Checked) { nd.HisCHWay = BP.WF.CHWay.ByWorkNum; } nd.IsEval = this.CB_IsEval.Checked; nd.Update(); }
/// <summary> /// 修改节点运行模式 /// </summary> /// <returns></returns> private string Node_ChangeRunModel() { string runModel = getUTF8ToString("RunModel"); BP.WF.Node node = new BP.WF.Node(this.FK_Node); //节点运行模式 switch (runModel) { case "NodeOrdinary": node.HisRunModel = BP.WF.RunModel.Ordinary; break; case "NodeFL": node.HisRunModel = BP.WF.RunModel.FL; break; case "NodeHL": node.HisRunModel = BP.WF.RunModel.HL; break; case "NodeFHL": node.HisRunModel = BP.WF.RunModel.FHL; break; case "NodeSubThread": node.HisRunModel = BP.WF.RunModel.SubThread; break; } return(node.Update().ToString()); }
/// <summary> /// 根据节点编号删除流程节点 /// </summary> /// <returns>执行结果</returns> private string Node_DeleteNodeOfNodeID() { try { int delResult = 0; string FK_Node = getUTF8ToString("FK_Node"); if (string.IsNullOrEmpty(FK_Node)) { return("true"); } BP.WF.Node node = new BP.WF.Node(int.Parse(FK_Node)); if (node.IsExits == false) { return("true"); } if (node.IsStartNode == true) { return("开始节点不允许被删除。"); } delResult = node.Delete(); if (delResult > 0) { return("true"); } return("Delete Error."); } catch (Exception ex) { return(ex.Message); } }
private void gvFlow_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { var baseUrl = BP.SystemConfig.AppSettings["BaseUrl"]; if (e.Button == MouseButtons.Left) { //this.Hide(); var flow_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["FK_Flow"]); var work_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["WorkID"]); var node_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["FK_Node"]); BP.WF.Node n = new BP.WF.Node(node_id.ToString()); var url = ""; if (n.IsStartNode) { url = baseUrl + "/WF/MyFlowSmall.aspx?FK_Flow=" + flow_id + "&FK_Node=" + node_id + "&userNo=" + BP.Web.WebUser.No + ""; } else { url = baseUrl + "/WF/MyFlowSmall.aspx?FK_Flow=" + flow_id + "&FK_Node=" + node_id + "&FID=0&WorkID=" + work_id + "&IsRead=0&userNo=" + BP.Web.WebUser.No + ""; } FlowBrowserForm f = new FlowBrowserForm(url); f.StartPosition = FormStartPosition.CenterScreen; f.Tag = "process"; f.ShowDialog(); } }
protected void Page_Load(object sender, EventArgs e) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); this.Page.Title = "您好:" + BP.Web.WebUser.No + " - " + BP.Web.WebUser.Name + ".当前节点:" + nd.Name; #region 处理权限控制. if (this.FK_Node == 11101) { /*如果是开始节点,就不能允许退回。*/ this.Btn_Return.Enabled = false; //加签也不能用. this.Btn_AskForHelp.Enabled = false; } if (BP.WF.Dev2Interface.Flow_IsCanDoCurrentWork(FK_Flow, this.FK_Node, this.WorkID, BP.Web.WebUser.No) == false) { /*如果当前人员不能处理当前工作,就把所有的button 禁用掉*/ foreach (Control ctl in this.Controls) { Button btn = ctl as Button; if (btn != null) { btn.Enabled = false; } } } #endregion 处理权限控制. }
/// <summary> /// 页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { BP.WF.Node nd = new BP.WF.Node(); nd.NodeID = this.FK_Node; nd.RetrieveFromDBSources(); switch (nd.HisTurnToDeal) { case BP.WF.TurnToDeal.CCFlowMsg: this.RB_CCFlowMsg.Checked = true; break; case BP.WF.TurnToDeal.SpecMsg: this.RB_SpecMsg.Checked = true; this.TB_SpecMsg.Text = nd.TurnToDealDoc; break; case BP.WF.TurnToDeal.SpecUrl: case BP.WF.TurnToDeal.TurnToByCond: this.RB_SpecUrl.Checked = true; this.TB_SpecURL.Text = nd.TurnToDealDoc; break; } } }
private void gvFlow_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { var baseUrl = BP.SystemConfig.AppSettings["BaseUrl"]; if (e.Button == MouseButtons.Left) { //this.Hide(); var flow_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["FK_Flow"]); var work_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["WorkID"]); var node_id = gvFlow.GetRowCellValue(e.RowHandle, gvFlow.Columns["FK_Node"]); BP.WF.Node n = new BP.WF.Node(node_id.ToString()); var url = ""; if (n.IsStartNode) { url = baseUrl + "/WF/MyFlowSmall.aspx?FK_Flow=" + flow_id + "&FK_Node=" + node_id + "&userNo=" + BP.Web.WebUser.No + ""; } else { url = baseUrl + "/WF/MyFlowSmall.aspx?FK_Flow=" + flow_id + "&FK_Node=" + node_id + "&FID=0&WorkID=" + work_id + "&IsRead=0&userNo=" + BP.Web.WebUser.No + ""; } FlowBrowserForm f = new FlowBrowserForm(url); f.StartPosition = FormStartPosition.CenterScreen; f.Tag = "process"; f.ShowDialog(); } }
/// <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("保存成功."); }
void btnC_Click(object sender, EventArgs e) { BP.WF.Node mynd = new BP.WF.Node(this.RefNo); BP.WF.Nodes nds = new BP.WF.Nodes(mynd.FK_Flow); foreach (BP.WF.Node nd in nds) { if ("ND" + nd.NodeID == this.RefNo) { continue; } GroupFields gfs = new GroupFields("ND" + nd.NodeID); foreach (GroupField gf in gfs) { string id = "CB_" + gf.OID; if (this.Pub1.GetCBByID(id).Checked == false) { continue; } MapAttrs attrs = new MapAttrs(); attrs.Retrieve(MapAttrAttr.GroupID, gf.OID); if (attrs.Count == 0) { continue; } } } }
/// <summary> /// 创建流程节点并返回编号 /// </summary> /// <returns></returns> private string Node_Create_GenerNodeID() { try { string FK_Flow = getUTF8ToString("FK_Flow"); string figureName = getUTF8ToString("FigureName"); string x = getUTF8ToString("x"); string y = getUTF8ToString("y"); int iX = 0; int iY = 0; if (!string.IsNullOrEmpty(x)) { iX = int.Parse(x); } if (!string.IsNullOrEmpty(y)) { iY = int.Parse(y); } int nodeId = BP.BPMN.Glo.NewNode(FK_Flow, iX, iY); BP.WF.Node node = new BP.WF.Node(nodeId); node.HisRunModel = Node_GetRunModelByFigureName(figureName); node.Update(); return(Newtonsoft.Json.JsonConvert.SerializeObject(new { success = true, msg = "", data = new { NodeID = nodeId, text = node.Name } })); } catch (Exception ex) { return(Newtonsoft.Json.JsonConvert.SerializeObject(new { success = false, msg = ex.Message, data = new { } })); } }
protected void Page_Load(object sender, EventArgs e) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); this.Page.Title = "您好:" + BP.Web.WebUser.No + " - " + BP.Web.WebUser.Name + " . 当前节点:" + nd.Name; if (this.FK_Node == 11001) { /*如果是开始节点,就不能允许退回。*/ this.Btn_Return.Enabled = false; } }
protected void Page_Load(object sender, EventArgs e) { try { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); this.Page.Title = "流程:" + nd.FlowName + ",节点:" + nd.Name + ",WorkID:" + this.WorkID + ",FK_Node:" + this.FK_Node; } catch { } }
protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); //绑定节点集合. BP.WF.Nodes nds = new BP.WF.Nodes(nd.FK_Flow); foreach (BP.WF.Node mynd in nds) { this.DDL_Node.Items.Add(new ListItem(mynd.Name, mynd.NodeID.ToString())); } switch (nd.HisOutTimeDeal) { case BP.WF.Template.OutTimeDeal.None: this.RB_0.Checked = true; break; case BP.WF.Template.OutTimeDeal.AutoTurntoNextStep: //自动运行到下一步. this.RB_1.Checked = true; break; case BP.WF.Template.OutTimeDeal.AutoJumpToSpecNode: // 自动转向指定的步骤 this.RB_2.Checked = true; //设置当前的选择. this.DDL_Node.SelectedValue = nd.DoOutTime; break; case BP.WF.Template.OutTimeDeal.AutoShiftToSpecUser: //移交给指定的人员. this.RB_3.Checked = true; this.TB_3_Shift.Text = nd.DoOutTime; break; case BP.WF.Template.OutTimeDeal.SendMsgToSpecUser: //向指定的人员发消息. this.TB_4_SendMsg.Text = nd.DoOutTime; this.RB_4.Checked = true; break; case BP.WF.Template.OutTimeDeal.DeleteFlow: //删除流程. this.RB_5.Checked = true; break; case BP.WF.Template.OutTimeDeal.RunSQL: //运行SQL this.RB_6.Checked = true; this.TB_6_SQL.Text = nd.DoOutTime; break; } } }
protected void Btn_Save_Click(object sender, EventArgs e) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); if (this.RB_0.Checked) { nd.HisOutTimeDeal = BP.WF.Template.OutTimeDeal.None; } if (this.RB_1.Checked) { nd.HisOutTimeDeal = BP.WF.Template.OutTimeDeal.AutoTurntoNextStep; } if (this.RB_2.Checked) { nd.HisOutTimeDeal = BP.WF.Template.OutTimeDeal.AutoJumpToSpecNode; nd.DoOutTime = this.DDL_Node.SelectedValue; } if (this.RB_3.Checked) { nd.HisOutTimeDeal = BP.WF.Template.OutTimeDeal.AutoShiftToSpecUser; nd.DoOutTime = this.TB_3_Shift.Text; } if (this.RB_4.Checked) { nd.HisOutTimeDeal = BP.WF.Template.OutTimeDeal.SendMsgToSpecUser; nd.DoOutTime = this.TB_4_SendMsg.Text; } if (this.RB_5.Checked) { nd.HisOutTimeDeal = BP.WF.Template.OutTimeDeal.DeleteFlow; } if (this.RB_6.Checked) { nd.HisOutTimeDeal = BP.WF.Template.OutTimeDeal.RunSQL; nd.DoOutTime = this.TB_6_SQL.Text; } //是否质量考核节点. nd.IsEval = this.CB_IsEval.Checked; //执行更新. nd.Update(); }
/// <summary> /// 发送流程 /// </summary> /// <param name="WorkID"></param> /// <param name="NodeID"></param> /// <param name="ToNodeID"></param> /// <param name="WFPARAMS"></param> /// <param name="NEXTWORKER"></param> /// <returns></returns> public ActionResult Node_SendWork(int WorkID, int NodeID, int ToNodeID = 0, List <KeyValuePair <string, string> > WFPARAMS = null, string NEXTWORKER = null) { var work = NH.Session.Load <WF_GenerWorkFlow>(WorkID); var flow = NH.Session.Load <WF_Flow>(work.FK_Flow); if (string.IsNullOrEmpty(work.YWH)) { var ywh = Sys_BH.GetBH(flow.BHID); work.YWH = ywh; work.Update(); } var node = new BP.WF.Node(NodeID); using (var trans = NH.Session.BeginTransaction()) { try { BP.WF.Dev2Interface.Port_Login(ApplicationUser.Current.Name, "dd2f628c-3f38-4c8c-aa83-1a52ebf6a45a"); if (node.IsEndNode) { FlowService.OnCompleted(work.FK_Flow, WorkID, work.YWH, NodeID); } else { FlowService.OnSend(work.FK_Flow, WorkID, work.YWH, NodeID); } WFPARAMS = WFPARAMS == null ? new List <KeyValuePair <string, string> >() : WFPARAMS; var result = BP.WF.Dev2Interface.Node_SendWork(work.FK_Flow, WorkID, ToNodeID, NEXTWORKER); trans.Commit(); var message = string.Format("案件【{0}】办理成功!", work.YWH); return(Json(new { success = true, message = message })); } catch (DomainException ex) { trans.Rollback(); return(Json(new { success = false, message = ex.Message })); } catch (Exception ex) { trans.Rollback(); return(Json(new { success = false, message = ex.Message })); } } }
/// <summary> /// 删除节点 /// </summary> /// <returns></returns> public ActionResult DeleteNode(int nodeId) { try { BP.WF.Node delNode = new BP.WF.Node(nodeId); delNode.Delete(); var sql = string.Format("delete from wf_direction where node={0} or tonode={0}", nodeId); BP.DA.DBAccess.RunSQL(sql); //var directionList = FlowService.GetDirectionsByFlowNo(delNode.FK_Flow); return(Json(new { success = true, msg = "删除成功" })); } catch { return(Json(new { success = false, msg = "删除失败" })); } }
/// <summary> /// 新建节点 /// </summary> /// <param name="flowNo">流程编号</param> /// <param name="nodeName">节点名称</param> /// <param name="x">x值</param> /// <param name="y">y值</param> /// <returns>操作结果</returns> public ActionResult AddNode(string flowNo, string nodeName = "新建节点", int x = 10, int y = 10) { var fl = new BP.WF.Flow(flowNo); try { BP.WF.Node nf = fl.DoNewNode(x, y); nf.Name = nodeName; nf.HisRunModel = BP.WF.RunModel.Ordinary; nf.HisDeliveryWay = BP.WF.DeliveryWay.ByStationOnly; nf.Save(); return(Json(new { success = true, msg = "新建节点成功" })); } catch { return(Json(new { success = false, msg = "新建节点失败" })); } }
protected void Btn_Send_Click(object sender, EventArgs e) { string msg = ""; try { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); string[] strs = this.WorkIDs.Split(','); foreach (string str in strs) { if (string.IsNullOrEmpty(str)) { continue; } Int64 wkid = Int64.Parse(str); BP.WF.GenerWorkFlow gwf = new BP.WF.GenerWorkFlow(wkid); BP.WF.SendReturnObjs objs = BP.WF.Dev2Interface.Node_SendWork(nd.FK_Flow, wkid, null); msg += "<fieldset>"; msg += "<legend>对工作(" + gwf.Title + ")处理情况如下。</legend>"; msg += objs.ToMsgOfHtml(); msg += "</fieldset>"; } msg = msg.Replace("@", "<br>@"); this.Response.Write(msg + "<script type='text/javascript'> window.onload = function(){var ifreamTable = document.getElementById('ifreamTable'); ifreamTable.style.display='none';} </script><br/>[<a href='/WF/Batch.aspx' style='color:blue;'>返回批处理</a>]"); } catch (Exception ex) { //if (ex.Message.Contains("节点没有岗位") || ex.Message.Contains("@没有找到可接受的工作人员") || ex.Message.Contains("没有找到人员") || ex.Message.Contains("流程设计错误") || ex.Message.Contains("@您设置的当前节点")) //{ ErrorMessage.InnerHtml = ex.Message + "<br/>"; // return; //} //msg = ex.ToString().Replace("@", "<BR>@"); //System.Web.HttpContext.Current.Session["info"] = msg; //System.Web.HttpContext.Current.Application["info" + WebUser.No] = msg; //System.Web.HttpContext.Current.Application["url"] = Request.RawUrl; //string url ="/WF/ErrorPage.aspx"; //this.Response.Redirect(url, true); } }
/// <summary> /// 修改节点名称 /// </summary> /// <returns></returns> private string Node_EditNodeName() { string FK_Node = getUTF8ToString("NodeID"); string NodeName = getUTF8ToString("NodeName"); BP.WF.Node node = new BP.WF.Node(); node.NodeID = int.Parse(FK_Node); int iResult = node.RetrieveFromDBSources(); if (iResult > 0) { node.Name = NodeName; node.Update(); return("true"); } return("false"); }
protected void Page_Load(object sender, EventArgs e) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); this.Page.Title = "您好:" + BP.Web.WebUser.No + " - " + BP.Web.WebUser.Name + " . 当前节点:" + nd.Name; if (this.IsPostBack == false) { //查询出来数据给表单赋值。 BP.Demo.SDK.QingJia en = new BP.Demo.SDK.QingJia(); en.OID = (int)this.WorkID; if (en.RetrieveFromDBSources() == 1) { /* 数据源已经有 */ this.TB_No.Text = en.QingJiaRenNo; // this.TB_Name.Text = en.QingJiaRenName; // 请假人名称. this.TB_DeptNo.Text = en.QingJiaRenDeptNo; //部门编号. this.TB_DeptName.Text = en.QingJiaRenDeptName; //部门名称 this.TB_QingJiaYuanYin.Text = en.QingJiaYuanYin; //请假原因 this.TB_QingJiaTianShu.Text = en.QingJiaTianShu.ToString(); //请假天数 } else { /*给他默认值*/ this.TB_No.Text = BP.Web.WebUser.No; this.TB_Name.Text = BP.Web.WebUser.Name; this.TB_DeptNo.Text = BP.Web.WebUser.FK_Dept; this.TB_DeptName.Text = BP.Web.WebUser.FK_DeptName; } if (this.FK_Node != 11001) { /*如果是不是开始节点,让其只读.*/ this.TB_No.ReadOnly = true; // this.TB_Name.ReadOnly = true; // 请假人名称. this.TB_DeptNo.ReadOnly = true; //部门编号. this.TB_DeptName.ReadOnly = true; //部门名称 this.TB_QingJiaTianShu.ReadOnly = true; this.TB_QingJiaYuanYin.ReadOnly = true; } } }
protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); this.TB_TSpanDay.Text = nd.TSpanDay.ToString(); this.TB_TSpanHour.Text = nd.TSpanHour.ToString(); BP.Web.Controls.Glo.DDL_BindEnum(this.DDL_TAlertRole, "CHAlertRole", (int)nd.TAlertRole); BP.Web.Controls.Glo.DDL_BindEnum(this.DDL_TAlertWay, "CHAlertWay", (int)nd.TAlertWay); BP.Web.Controls.Glo.DDL_BindEnum(this.DDL_WAlertRole, "CHAlertRole", (int)nd.WAlertRole); BP.Web.Controls.Glo.DDL_BindEnum(this.DDL_WAlertWay, "CHAlertWay", (int)nd.WAlertWay); this.TB_WarningHour.Text = nd.WarningHour.ToString(); this.TB_WarningDay.Text = nd.WarningDay.ToString(); this.TB_TCent.Text = nd.TCent.ToString(); switch (nd.HisCHWay) { case BP.WF.CHWay.None: this.RB_None.Checked = true; break; case BP.WF.CHWay.ByTime: this.RB_ByTime.Checked = true; break; case BP.WF.CHWay.ByWorkNum: this.RB_ByWorkNum.Checked = true; break; default: break; } //是否质量考核点. this.CB_IsEval.Checked = nd.IsEval; } }
protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { BP.WF.Node nd = new BP.WF.Node(); nd.NodeID = this.FK_Node; nd.RetrieveFromDBSources(); this.TB_Alert.Text = nd.BlockAlert; //提示信息. switch (nd.BlockModel) { case BP.WF.BlockModel.None: this.RB_None.Checked = true; break; case BP.WF.BlockModel.CurrNodeAll: this.RB_CurrNodeAll.Checked = true; break; case BP.WF.BlockModel.SpecSubFlow: this.RB_SpecSubFlow.Checked = true; this.TB_SpecSubFlow.Text = nd.BlockExp; break; case BP.WF.BlockModel.BySQL: this.RB_SQL.Checked = true; this.TB_SQL.Text = nd.BlockExp; break; case BP.WF.BlockModel.ByExp: this.RB_Exp.Checked = true; this.TB_Exp.Text = nd.BlockExp; break; default: break; } } }
/// <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("保存成功."); }
protected void Btn_Save_Click(object sender, EventArgs e) { BP.WF.Node nd = new BP.WF.Node(this.FK_Node); nd.BlockAlert = this.TB_Alert.Text; //提示信息. if (this.RB_None.Checked) { nd.BlockModel = BP.WF.BlockModel.None; } if (this.RB_CurrNodeAll.Checked) { nd.BlockModel = BP.WF.BlockModel.CurrNodeAll; } if (this.RB_SpecSubFlow.Checked) { nd.BlockModel = BP.WF.BlockModel.SpecSubFlow; nd.BlockExp = this.TB_SpecSubFlow.Text; } if (this.RB_SQL.Checked) { nd.BlockModel = BP.WF.BlockModel.BySQL; nd.BlockExp = this.TB_SQL.Text; } if (this.RB_Exp.Checked) { nd.BlockModel = BP.WF.BlockModel.ByExp; nd.BlockExp = this.TB_Exp.Text; } nd.BlockAlert = this.TB_Alert.Text; nd.Update(); }
/// <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; } } } }
/// <summary> /// 是否最后一个节点 /// </summary> /// <param name="nodeId">节点标识</param> /// <returns>是或否</returns> public static bool IsEndNode(int nodeId) { var node = new BP.WF.Node(nodeId); return(node.IsEndNode); }
public string DoFAppSet() { BP.WF.Node nd = new BP.WF.Node(this.NodeID); return(nd.DoFAppSet()); }
public string DoBill() { BP.WF.Node nd = new BP.WF.Node(this.NodeID); return(nd.DoBill()); }
//public string DoCondFL() //{ // BP.WF.Node nd = new BP.WF.Node(this.NodeID); // return nd.DoCondFL(); //} public string DoMapData() { BP.WF.Node nd = new BP.WF.Node(this.NodeID); return(nd.DoMapData()); }
public string DoShowSheets() { BP.WF.Node nd = new BP.WF.Node(this.NodeID); return(nd.DoShowSheets()); }
void btn_Click(object sender, EventArgs e) { string accepters = (Pub1.FindControl("HID_SelectedEmps") as HiddenField).Value;// this.Pub1.GetTextBoxByID("TB_Accepter").Text; accepters = accepters.Trim(); if (string.IsNullOrEmpty(accepters)) { this.Alert("接受人不能为空"); return; } string title = this.Pub1.GetTextBoxByID("TB_Title").Text; if (string.IsNullOrEmpty(title)) { this.Alert("标题不能为空"); return; } string doc = this.Pub1.GetTextBoxByID("TB_Doc").Text; //节点. BP.WF.Node nd = new BP.WF.Node(this.FK_Node); /*检查人员是否有问题.*/ string[] emps = accepters.Split(','); BP.Port.Emp myemp = new BP.Port.Emp(); string errMsg = ""; foreach (string emp in emps) { if (string.IsNullOrEmpty(emp)) { continue; } myemp.No = emp; if (myemp.IsExits == false) { errMsg += "@人员(" + emp + ")拼写错误。"; } } if (string.IsNullOrEmpty(errMsg) == false) { this.Alert(errMsg); return; } //抄送信息. string msg = ""; foreach (string emp in emps) { if (string.IsNullOrEmpty(emp)) { continue; } myemp.No = emp; myemp.Retrieve(); msg += "(" + myemp.No + "," + myemp.Name + ")"; // 根据节点属性的配置写入数据. switch (nd.CCWriteTo) { case BP.WF.CCWriteTo.All: BP.WF.Dev2Interface.Node_CC_WriteTo_CClist(this.FK_Node, this.FK_Node, this.WorkID, emp, myemp.Name, title, doc); BP.WF.Dev2Interface.Node_CC_WriteTo_Todolist(this.FK_Node, this.FK_Node, this.WorkID, emp, myemp.Name); break; case BP.WF.CCWriteTo.CCList: BP.WF.Dev2Interface.Node_CC_WriteTo_CClist(this.FK_Node, this.FK_Node, this.WorkID, emp, myemp.Name, title, doc); break; case BP.WF.CCWriteTo.Todolist: BP.WF.Dev2Interface.Node_CC_WriteTo_Todolist(this.FK_Node, this.FK_Node, this.WorkID, emp, myemp.Name); break; default: break; } } //写入日志. BP.WF.Dev2Interface.WriteTrack(nd.FK_Flow, nd.NodeID, this.WorkID, this.FID, "抄送给:" + msg, BP.WF.ActionType.CC, null, null, null); // this.WinCloseWithMsg("抄送成功..."); this.WinClose("1"); }