/// <summary> /// 一次验证:提交流程之前验证 /// </summary> /// <returns></returns> private bool BeforeSubmit() { string erpFormCode = Request["erpFormId"]; if (!string.IsNullOrEmpty(_BPMContext.ProcID)) { erpFormCode = ContractApproval.GetModelByInstId(_BPMContext.ProcID).ErpFormId; } ERP_CallbackResultType resultType = new ContractApproval_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); }
/// <summary> /// 0次验证 /// </summary> /// <returns></returns> private bool VertifyOverTime() { string erpFormCode = Request["erpFormId"]; if (!string.IsNullOrEmpty(_BPMContext.ProcID)) { erpFormCode = ContractApproval.GetModelByInstId(_BPMContext.ProcID).ErpFormId; } ERP_CallbackResultType resultType = new ContractApproval_Service().VerifyERPWFStatus(erpFormCode); if (resultType != ERP_CallbackResultType.调用成功) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('流程已超时,请重新发起流程!'); window.opener=null;window.open('', '_self', '');window.close();", true); return(false); } return(true); }
public static string GetErpUrl() { string erpFormId = HttpContext.Current.Request["erpFormId"]; string erpFormType = HttpContext.Current.Request["erpFormType"]; string startDeptId = HttpContext.Current.Request["startDeptId"]; string id = HttpContext.Current.Request["Id"]; if (string.IsNullOrEmpty(id)) {//新建页面 if (string.IsNullOrEmpty(erpFormId) || string.IsNullOrEmpty(erpFormType) ) { //参数错误 ExceptionHander.GoToErrorPage(); return(null); } } else { ContractApprovalInfo info = ContractApproval.GetModelByInstId(id); if (info == null) { ExceptionHander.GoToErrorPage(); return(null); } erpFormId = info.ErpFormId; erpFormType = info.ErpFormType; } Dictionary <string, string> pageNames = IFrameHelper.GetUrlDatas(); if (!pageNames.Keys.Contains(erpFormType)) { ExceptionHander.GoToErrorPage(); return(null); } string pageName = pageNames[erpFormType]; return(string.Format("{0}{1}", pageName, erpFormId)); }