private bool BeforeSubmit() { string erpFormCode = Request["erpFormId"]; if (!string.IsNullOrEmpty(_BPMContext.ProcID)) { erpFormCode = PaymentApplication.GetPaymentApplicationInfoByInstanceId(_BPMContext.ProcID).ErpFormId; } ERP_CallbackResultType resultType = new ERP_PaymentApplication_Service().NotifyStartAdvance(erpFormCode, false); if (resultType != ERP_CallbackResultType.调用成功) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip + "'); window.opener=null;window.open('', '_self', '');window.close();", true); return(false); } return(true); }
private bool AfterWorkflowStart(int wfInstanceId) { PaymentApplicationInfo info = PaymentApplication.GetPaymentApplicationInfo(FormId); ERP_CallbackResultType resultType = new ERP_PaymentApplication_Service().NotifyStartAdvance(info.ErpFormId, true); if (resultType != ERP_CallbackResultType.调用成功) { //删除流程实例 new WF_WorkFlowInstance().DeleteWorkFlowInstance(_BPMContext.ProcID); //撤销已发起的流程 WorkflowManage.StopWorkflow(wfInstanceId); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip + "'); window.opener=null;window.open('', '_self', '');window.close();", true); return(false); } return(true); }