protected void Btn_Send_Click(object sender, EventArgs e) { try { BP.WF.SendReturnObjs objs = BP.WF.Dev2Interface.Node_SendWork(this.FK_Flow, this.WorkID); this.Response.Write(objs.ToMsgOfHtml()); this.ToMsg(objs.ToMsgOfHtml()); } catch (Exception ex) { this.ToMsg(ex.Message); } }
/// <summary> /// 执行发送 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Btn_Send_Click(object sender, EventArgs e) { //第1步: 执行保存. this.Btn_Save_Click(null, null); // 检查完整性 BP.Demo.SDK.QingJia en = new BP.Demo.SDK.QingJia(); en.OID = (int)this.WorkID; en.Retrieve(); if (en.QingJiaTianShu <= 0) { this.Response.Write("<font color=red>保存失败,请假天数不能小于等于零。</font>"); return; } #region 第2步: 执行发送. BP.WF.SendReturnObjs objs = null; try { //编写我的业务逻辑.... //调用发送api, 返回发送对象. objs = BP.WF.Dev2Interface.Node_SendWork(this.FK_Flow, this.WorkID); } catch (Exception ex) { this.Response.Write("<font color=red>发送期间出现异常:" + ex.Message + "</font>"); return; } // objs.v /* * 这里注意: * 1,发送api有多个, 根据不同的场景使用不同的api 但是常用的就那1个,您可以产看该参数使用说明. * BP.WF.Node_SendWork(string fk_flow, Int64 workID, int toNodeID, string toEmps) * 2,回来的发送对象里面有系统变量,这些系统变量包括发送给谁了,发送到那里了. * 开发人员可以根据系统变量,执行相关的业务逻辑操作. */ #endregion 第2步: 执行发送. #region 第3步: 把发送信息提示出来. //objs.v string info = objs.ToMsgOfHtml(); info = info.Replace("\t\n", "<br>@"); info = info.Replace("@", "<br>@"); this.Response.Write("<font color=blue>" + info + "</font>"); #endregion 第3步: 把发送信息提示出来. this.Btn_Save.Enabled = false; this.Btn_Send.Enabled = false; }
protected void Btn_Send_Click(object sender, EventArgs e) { try { Btn_Save_Click(null, null); //执行保存. BP.WF.SendReturnObjs objs = BP.WF.Dev2Interface.Node_SendWork(this.FK_Flow, this.WorkID); // 执行发送. this.ToMsg(objs.ToMsgOfHtml()); //输出信息. } catch (Exception ex) { this.ToMsg(ex.Message); } }
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); } }