protected void Button1_Click(object sender, System.EventArgs e) { string id = this.ToolbarCheckBtnGroup1.SelectedCheckButton.ID; string help = ""; Int64 WorkID = Int64.Parse(this.Request.QueryString["WorkID"]); string fk_flow = this.Request.QueryString["FK_Flow"]; Flow fl = new Flow(fk_flow); WorkFlow wf = new WorkFlow(fl, WorkID); //Node nd = new Node(t switch (id) { //case "Btn_StopWorkFlow": // wf.DoStopWorkFlow(this.TextBox1.Text); // break; case "Btn_ComeBackFlow": wf.DoComeBackWrokFlow(this.TextBox1.Text); break; //case "Btn_DeleteFlowByFlag": // wf.DoDeleteWorkFlowByFlag(this.TextBox1.Text); // break; //case "Btn_DeleteWFByRealReal": // wf.DoDeleteWorkFlowByReal(); // break; default: break; } //this.Label1.Text=help; this.ResponseWriteBlueMsg("执行成功。"); this.WinClose(); }
private void Btn_Click_Click(object sender, System.EventArgs e) { string msg = ""; try { Int64 workId = Int64.Parse(this.Request.QueryString["WorkID"]); GenerWorkFlow gwf = new GenerWorkFlow(workId); WorkFlow wf = new WorkFlow(new Flow(gwf.FK_Flow), workId); BP.Web.Controls.ToolbarBtn btn = (BP.Web.Controls.ToolbarBtn)sender; string title, docs; switch (btn.ID) { case "Btn_StopWorkFlow": msg = "@终止流程出现错误.:"; // wf.DoStopWorkFlow(this.TB1.Text); // 发送消息到相关人员。 title = "强制终止[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; //WFPubClass.SendMsg( new WorkNodes(gwf.HisFlow,workId),title,docs); this.ResponseWriteBlueMsg("@强制终止流程成功.并发送系统消息到流程上的相关人员。"); break; case "Btn_DeleteFlowByFlag": msg = "@逻辑删除流程出现错误.:"; // wf.DoDeleteWorkFlowByFlag(this.TB1.Text); // 发送消息到相关人员。 title = "逻辑删除[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; // WFPubClass.SendMsg( new WorkNodes(gwf.HisFlow,workId),title,docs); this.ResponseWriteBlueMsg("@逻辑删除流程成功,并发送系统消息到流程上的相关人员."); break; case "Btn_ComeBackFlow": msg = "@恢复使用流程出现错误.:"; wf.DoComeBackWrokFlow(this.TB1.Text); // 发送消息到相关人员。 title = "恢复使用流程[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; //WFPubClass.SendMsg( new WorkNodes(gwf.HisFlow,workId),title,docs); this.ResponseWriteBlueMsg("@恢复使用流程成功,并发送系统消息到流程上的相关人员"); break; case "Btn_DeleteWFByRealReal": msg = "@物理删除流程出现错误.:"; wf.DoDeleteWorkFlowByReal(true); // 发送消息到相关人员。 title = "物理删除[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; this.ResponseWriteBlueMsg("@物理删除流程成功..."); this.WinClose(); break; case "Btn_Close": this.WinClose(); return; default: break; } this.SetState(); } catch (Exception ex) { BP.DA.Log.DefaultLogWriteLine(BP.DA.LogType.Error, msg + ex.Message); this.ResponseWriteRedMsg(msg + ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { workid = this.Request.QueryString["WorkID"]; fk_Flow = this.Request.QueryString["FK_Flow"]; fk_Node = this.Request.QueryString["FK_Node"]; doType = this.Request.QueryString["DoType"]; workIDint = Int64.Parse(workid); #region 功能执行 try { switch (this.Request.QueryString["DoType"]) { case "Del": WorkFlow wf = new WorkFlow(fk_Flow, workIDint); wf.DoDeleteWorkFlowByReal(true); this.WinCloseWithMsg("流程已经被删除."); break; case "HungUp": WorkFlow wf1 = new WorkFlow(fk_Flow, workIDint); //wf1.DoHungUp(HungUpWa; this.WinCloseWithMsg("流程已经被挂起."); break; case "UnHungUp": WorkFlow wf2 = new WorkFlow(fk_Flow, workIDint); // wf2.DoUnHungUp(); this.WinCloseWithMsg("流程已经被解除挂起."); break; case "ComeBack": WorkFlow wf3 = new WorkFlow(fk_Flow, workIDint); wf3.DoComeBackWrokFlow("无"); this.WinCloseWithMsg("流程已经被回复启用."); break; case "Takeback": /*取回审批.*/ break; default: break; } } catch (Exception ex) { this.Alert("执行功能:" + doType + ",出现错误:" + ex.Message); } #endregion int wfState = BP.DA.DBAccess.RunSQLReturnValInt("SELECT WFState FROM WF_GenerWorkFlow WHERE WorkID=" + workid, 1); WFState wfstateEnum = (WFState)wfState; this.Pub2.AddH3("您可执行的操作<hr>"); switch (wfstateEnum) { case WFState.Runing: /* 运行时*/ this.FlowOverByCoercion(); /*删除流程.*/ this.TackBackCheck(); /*取回审批*/ this.Hurry(); /*催办*/ this.UnSend(); /*撤销发送*/ break; case WFState.Complete: // 完成. case WFState.Delete: // 逻辑删除.. this.RollBack(); /*恢复使用流程*/ break; case WFState.HungUp: // 挂起. this.AddUnHungUp(); /*撤销挂起*/ break; default: break; } }