/// <summary> /// 添加工作流管理 /// </summary> /// <param name="args">保存或已提交</param> private int SavePaymentWorkflow(string args, string auditsatus, string serialNumber) { int result = 0; JobFlow jobflow = null; if (Request.Params["jobflowid"] == null || Request.Params["jobflowid"] == "") { jobflow = new JobFlow(); jobflow.savestatus = args.ToString(); jobflow.createtime = DateTime.Now; jobflow.endtime = DateTime.Now; jobflow.cname = serialNumber; jobflow.attachment = ""; jobflow.sort = "05"; jobflow.auditsort = ""; jobflow.auditstatus = auditsatus; jobflow.founderid = ((LoginInfo)Session["login"]).Id; jobflow.txt = ""; jobflow.ruleid = int.Parse(ddlApproval.SelectedValue); result = JobFlowManager.AddAndGetId(jobflow); } else { result = int.Parse(Request.Params["jobflowid"]); jobflow = JobFlowManager.GetModel(int.Parse(Request.Params["jobflowid"])); if (jobflow != null) { jobflow.savestatus = args.ToString(); jobflow.auditstatus = auditsatus; jobflow.ruleid = int.Parse(ddlApproval.SelectedValue); JobFlowManager.Update(jobflow); } } return(result); }
/// <summary> /// 添加工作流管理 /// </summary> /// <param name="args">保存或已提交</param> private int SavePolicyJob(string args, string auditsatus) { int result = 0; JobFlow jobflow = null; if (Request.Params["jobflowid"] == null || Request.Params["jobflowid"] == "") { string cuscode = ""; //公司代码全称 string codeformat = ""; //公司代码,不包含流水号 string ordernum = ""; //流水号 StrNumbers(TxtSerialNum.Text.Trim(), out cuscode, out codeformat, out ordernum); jobflow = new JobFlow(); jobflow.savestatus = args.ToString(); jobflow.createtime = DateTime.Now; jobflow.endtime = DateTime.Now; jobflow.cname = cuscode; //工作流名称 jobflow.attachment = ""; //附件上传(1表示有附件) jobflow.sort = "02"; jobflow.auditsort = ""; //审核类型 jobflow.auditstatus = auditsatus; jobflow.founderid = ((LoginInfo)Session["login"]).Id; jobflow.txt = ""; jobflow.ruleid = int.Parse(this.DdlIsVirify.SelectedValue); //审核流程图关联id result = JobFlowManager.AddAndGetId(jobflow); } else { result = int.Parse(Request.Params["jobflowid"]); jobflow = JobFlowManager.GetModel(int.Parse(Request.Params["jobflowid"])); if (jobflow != null) { jobflow.savestatus = args.ToString(); jobflow.auditstatus = auditsatus; jobflow.ruleid = int.Parse(this.DdlIsVirify.SelectedValue); JobFlowManager.Update(jobflow); } } return(result); }