private void BindFormData() { string methodName = "BindFormData"; try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } JC_ElevatorOrderInfo item = jc.GetElevatorOrder(Instance.FormId.ToString()); if (item == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (item != null) { cblSecurityLevel.SelectedValue = item.SecurityLevel.ToString(); cblUrgentLevel.SelectedValue = item.UrgenLevel != null?item.UrgenLevel.ToString() : "0"; tbData.Text = ((DateTime)item.Date).ToString("yyyy-MM-dd"); tbPerson.Text = item.UserName; tbDepartName.Text = item.DeptName; tbPhone.Text = item.Mobile; tbTitle.Text = item.ReportTitle; tbOrderType.Text = item.OrderType.ToString(); tbOrderID.Text = item.OrderID.ToString(); tbContent.Text = item.Url; tbNumber.Text = item.ReportCode; txtMaxCost.Text = item.MaxCost.HasValue ? FormatMoney(item.MaxCost.Value.ToString()) : ""; tbNote.Text = item.Note; //add 2014-12-23 Countersign1.CounterSignDeptId = item.StartDeptCode; } Countersign1.ProcId = ViewState["InstanceID"].ToString(); #region 审批意见框 DeptManagerApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); RealateDeptApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); CityCompanyLeaderApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); JCFirstApprovalApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); DesignerApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); ProjectOperatorApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); JCReApprovalApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); PurchaserApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); COOApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); JCMakeOrderApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); JCFinalApprovalApproveOpinion.InstanceId = ViewState["InstanceID"].ToString(); #endregion } catch (Exception ex) { Logger.Write(this.GetType(), EnumLogLevel.Fatal, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.Exception + ":" + string.Format("Exception={0}", ex)); throw ex; } Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
private void BindFormData() { try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } InstructionOfEToGInfo obj = Vitems.Get(Instance.FormId.ToString()); if (obj == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (obj != null) { tbReportCode.Text = obj.FormID; tbDepartName.Text = obj.DeptName; lbDeptCode.Text = obj.DeptCode; tbDateTime.Text = obj.DateTime; tbUserName.Text = obj.UserName; tbMobile.Text = obj.Mobile; tbTitle.Text = obj.Title; tbContent.Text = obj.Content.Replace(" ", " ").Replace("\n", "<br/>"); cbIsReport.Checked = obj.IsReport == "1" ? true : false; cblSecurityLevel.SelectedValue = obj.SecurityLevel != null?obj.SecurityLevel.ToString() : "-1"; cblUrgenLevel.SelectedValue = obj.UrgenLevel != null?obj.UrgenLevel.ToString() : "-1"; } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); #region 审批意见框 OpinionDeptDiretor.InstanceId = ViewState["InstanceID"].ToString(); OpinionDeptManager.InstanceId = ViewState["InstanceID"].ToString(); OpinionCountersign.InstanceId = ViewState["InstanceID"].ToString(); OpinionAP.InstanceId = ViewState["InstanceID"].ToString(); OpinionVP.InstanceId = ViewState["InstanceID"].ToString(); OpinionDirectors.InstanceId = ViewState["InstanceID"].ToString(); OpinionCFO.InstanceId = ViewState["InstanceID"].ToString(); OpinionEVP.InstanceId = ViewState["InstanceID"].ToString(); OpinionPresident.InstanceId = ViewState["InstanceID"].ToString(); OpinionChairman.InstanceId = ViewState["InstanceID"].ToString(); #endregion } catch (Exception ex) { throw ex; } }
private void BindFormData() { try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } CadresOrRemovalInfo obj = Vitems.Get(Instance.FormId.ToString()); if (obj == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (obj != null) { InitApproveList2(obj.IsGroup); tbReportCode.Text = obj.FormID; tbCadresName.Text = obj.CadresName; tbLocationCompanyDeptJob.Text = obj.LocationCompanyDeptJob.Replace(" ", " ").Replace("\n", "<br/>"); tbCadresCompanyDeptJob.Text = obj.CadresCompanyDeptJob.Replace(" ", " ").Replace("\n", "<br/>"); tbCadresContent.Text = obj.CadresContent.Replace(" ", " ").Replace("\n", "<br/>"); tbRemovalName.Text = obj.RemovalName; tbLocationCompanyDeptJobR.Text = obj.LocationCompanyDeptJobR.Replace(" ", " ").Replace("\n", "<br/>"); tbRemovalCompanyDeptjob.Text = obj.RemovalCompanyDeptjob.Replace(" ", " ").Replace("\n", "<br/>"); tbRemovalContent.Text = obj.RemovalContent.Replace(" ", " ").Replace("\n", "<br/>"); if (!string.IsNullOrEmpty(obj.chkCadresOrRemoval)) { tbCadre.Visible = obj.chkCadresOrRemoval != "1" ? true : false; tbRemoval.Visible = obj.chkCadresOrRemoval != "0" ? true : false; } } UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); OpinionDeptManager.InstanceId = ViewState["InstanceID"].ToString(); OpinionHRDeptManager.InstanceId = ViewState["InstanceID"].ToString(); OpinionDirector1.InstanceId = ViewState["InstanceID"].ToString(); OpinionDirector2.InstanceId = ViewState["InstanceID"].ToString(); OpinionDirector3.InstanceId = ViewState["InstanceID"].ToString(); OpinionDirector4.InstanceId = ViewState["InstanceID"].ToString(); OpinionChairman.InstanceId = ViewState["InstanceID"].ToString(); } catch (Exception ex) { throw ex; } }
private void BindFormData() { try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } PurchasePaintInfo obj = Vitems.Get(Instance.FormId.ToString()); if (obj == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (obj != null) { tbReportCode.Text = obj.FormID; tbDepartName.Text = obj.DeptName; lbDeptCode.Text = obj.DeptCode; tbDateTime.Text = obj.DateTime; tbUserName.Text = obj.UserName; tbMobile.Text = obj.Mobile; tbTitle.Text = obj.Title; tbContent.Text = obj.Content.Replace(" ", " ").Replace("\n", "<br/>"); } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); #region 审批意见框 OpinionDeptManager.InstanceId = ViewState["InstanceID"].ToString(); OpinionCountersign.InstanceId = ViewState["InstanceID"].ToString(); OpinionPresident.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupAuditor.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupProjectLeader.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupDeptLeader.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupDeptManager.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupLeader.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupAuditor2.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupReviewer.InstanceId = ViewState["InstanceID"].ToString(); #endregion } catch (Exception ex) { throw ex; } }
private void BindFormData() { try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } SealOfPKURGIInfo obj = Vitems.Get(Instance.FormId.ToString()); if (obj == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (obj != null) { tbReportCode.Text = obj.FormID; tbDepartName.Text = obj.DeptName; lbDeptCode.Text = obj.DeptCode; tbDateTime.Text = obj.DateTime; tbUserName.Text = obj.UserName; tbMobile.Text = obj.Mobile; tbTitle.Text = obj.Title; tbContent.Text = obj.Content.Replace(" ", " ").Replace("\n", "<br/>"); cblSecurityLevel.SelectedValue = obj.SecurityLevel != null?obj.SecurityLevel.ToString() : "-1"; cblUrgenLevel.SelectedValue = obj.UrgenLevel != null?obj.UrgenLevel.ToString() : "-1"; } Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); OpinionDeptManager.InstanceId = ViewState["InstanceID"].ToString(); OpinionCountersign.InstanceId = ViewState["InstanceID"].ToString(); OpinionAP.InstanceId = ViewState["InstanceID"].ToString(); OpinionVP.InstanceId = ViewState["InstanceID"].ToString(); OpinionPresident.InstanceId = ViewState["InstanceID"].ToString(); OpinionChairman.InstanceId = ViewState["InstanceID"].ToString(); OpinionGroupOffice.InstanceId = ViewState["InstanceID"].ToString(); } catch (Exception ex) { throw ex; } }
private void InintData() { string methodName = "InintData"; try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); SystemDispatchInfo info = SystemDispatch.GetSystemDispatchInfoByInstanceId(ViewState["InstanceID"].ToString()); if (info != null) { cblSecurityLevel.SelectedIndex = Convert.ToInt32(info.SecurityLevel); cblUrgenLevel.SelectedIndex = Convert.ToInt32(info.UrgenLevel); tbDepartName.Text = info.DeptName; tbDateTime.Text = info.DateTime; tbDateTime.Text = info.DateTime; tbUserName.Text = info.UserName; tbMobile.Text = info.Mobile; tbTitle.Text = info.Title; tbContent.Text = info.Content.Replace(" ", " ").Replace("\n", "<br/>"); cblRedHeadDocument.SelectedIndex = int.Parse(info.RedHeadDocument); cblIsPublish.SelectedIndex = int.Parse(info.IsPublish); cblSecurityLevel.SelectedIndex = int.Parse(info.SecurityLevel); cblUrgenLevel.SelectedIndex = int.Parse(info.UrgenLevel); tbReportCode.Text = info.FormId; } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); OpinionDeptleader.InstanceId = ViewState["InstanceID"].ToString(); OpinionRealateDept.InstanceId = ViewState["InstanceID"].ToString(); OpinionTopLeaders.InstanceId = ViewState["InstanceID"].ToString(); OpinionCEO.InstanceId = ViewState["InstanceID"].ToString(); OpinionChairman.InstanceId = ViewState["InstanceID"].ToString(); } catch (Exception ex) { Logger.Write(this.GetType(), EnumLogLevel.Fatal, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.Exception + ":" + string.Format("Exception={0}", ex)); throw ex; } Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
private void InintData() { string methodName = "InintData"; try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); InstructionOfPkurg item = wf_Instruction.GetInstructionOfPkurgById(Instance.FormId.ToString()); if (item != null) { cblSecurityLevel.SelectedValue = item.SecurityLevel.ToString(); cblUrgentLevel.SelectedValue = item.UrgenLevel != null?item.UrgenLevel.ToString() : "0"; tbData.Text = ((DateTime)item.Date).ToString("yyyy-MM-dd"); tbPerson.Text = item.UserName; tbDepartName.Text = item.DeptName; tbPhone.Text = item.Mobile; tbTheme.Text = item.ReportTitle; tbContent.Text = item.ReportContent; tbNumber.Text = item.ReportCode; cbIsReport.Checked = item.IsReport == 1 ? true : false; } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); ApproveOpinionUCDeptleader.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCRealateDept.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCLeader.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCCEO.InstanceId = ViewState["InstanceID"].ToString(); } catch (Exception ex) { Logger.Write(this.GetType(), EnumLogLevel.Fatal, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.Exception + ":" + string.Format("Exception={0}", ex)); throw ex; } Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
private void InintData() { string methodName = "InintData"; try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); InstructionInfo item = Instruction.GetInstructionInfoByInstanceId(ViewState["InstanceID"].ToString()); if (item != null) { InstructionInfo info = Instruction.GetInstructionInfo(Instance.FormId); Department deptInfo = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(info.StartDeptId); ddlDepartName.Text = deptInfo.Remark; cbChairman.Checked = info.IsCheckedChairman == 1; } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); ApproveOpinionUCDeptleader.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCRealateDept.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCLeader.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCCEO.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC1.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC2.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC22.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC3.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC4.InstanceId = ViewState["InstanceID"].ToString(); Option_10.InstanceId = ViewState["InstanceID"].ToString(); Option_11.InstanceId = ViewState["InstanceID"].ToString(); } catch (Exception ex) { Logger.Write(this.GetType(), EnumLogLevel.Fatal, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.Exception + ":" + string.Format("Exception={0}", ex)); throw ex; } Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
/// <summary> /// <summary> /// 绑定表单数据 /// </summary> private void BindFormData() { try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } ContractAuditOfGroupInfo obj = Vitems.Get(Instance.FormId.ToString()); if (obj == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (obj != null) { //保存数据 tbReportCode.Text = obj.FormID; cblSecurityLevel.SelectedIndex = int.Parse(obj.SecurityLevel.ToString()); cblUrgenLevel.SelectedIndex = int.Parse(obj.UrgenLevel.ToString()); tbDepartName.Text = obj.DeptName; lbDeptCode.Text = obj.DeptCode; tbUserName.Text = obj.UserName; tbMobile.Text = obj.Mobile; tbDateTime.Text = obj.DateTime; //合同类型 if (obj.ContractType1 == "00") { ddlContractType1.Text = ""; } else { ddlContractType1.Text = obj.ContractTypeName1; } ddlContractType2.Text = obj.ContractTypeName2; ddlContractType3.Text = obj.ContractTypeName3; tbContractSum.Text = obj.ContractSum; cblIsSupplementProtocol.SelectedValue = obj.IsSupplementProtocol; tbSupplementProtocol.Text = obj.IsSupplementProtocolText; cblIsFormatContract.SelectedValue = obj.IsFormatContract; cblIsNormText.SelectedValue = obj.IsNormText; cblIsBidding.SelectedValue = obj.IsBidding; cblIsEstateProject.SelectedValue = obj.IsEstateProject; if (obj.EstateProjectName == "0") { ddlEstateProjectName.Text = ""; } else { ddlEstateProjectName.Text = obj.EstateProjectNameText; } if (obj.EstateProjectNum == "0") { ddlEstateProjectNum.Text = ""; } else { ddlEstateProjectNum.Text = obj.EstateProjectNumText; } //合同主体 if (obj.ContractSubject == "00000") { ddlContractSubject.Text = ""; } else { ddlContractSubject.Text = obj.ContractSubjectName; } tbContractSubject1.Text = obj.ContractSubjectName2; tbContractSubject2.Text = obj.ContractSubjectName3; tbContractSubject3.Text = obj.ContractSubjectName4; tbContractTitle.Text = obj.ContractTitle; tbContractContent.Text = obj.ContractContent.Replace(" ", " ").Replace("\n", "<br/>"); cbIsReport.Checked = obj.IsReport == "1" ? true : false; //if (!string.IsNullOrEmpty(obj.IsApproval)) //{ // lbIsApproval.Text = string.Format("{1}({0})", obj.IsApproval == "1" ? "批准" : "拒绝", lbIsApproval.Text); // if (obj.IsApproval == "1") // { // this.lbIsApproval.Style.Add("color", "green"); // } // else // { // this.lbIsApproval.Style.Add("color", "red"); // } //} } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); #region 审批意见框 OpinionDeptManager.InstanceId = ViewState["InstanceID"].ToString(); OpinionCountersign.InstanceId = ViewState["InstanceID"].ToString(); OpinionLawDept.InstanceId = ViewState["InstanceID"].ToString(); OpinionAP.InstanceId = ViewState["InstanceID"].ToString(); OpinionLawAP.InstanceId = ViewState["InstanceID"].ToString(); OpinionVP.InstanceId = ViewState["InstanceID"].ToString(); OpinionDirectors.InstanceId = ViewState["InstanceID"].ToString(); OpinionPresident.InstanceId = ViewState["InstanceID"].ToString(); OpinionChairman.InstanceId = ViewState["InstanceID"].ToString(); OpinionStartToFinallyContract.InstanceId = ViewState["InstanceID"].ToString(); OpinionLawAuditOpinion.InstanceId = ViewState["InstanceID"].ToString(); OpinionSealAdministrator.InstanceId = ViewState["InstanceID"].ToString(); OpinionFileManager.InstanceId = ViewState["InstanceID"].ToString(); #endregion } catch (Exception ex) { throw ex; } }
public bool CreateNewFormByInstanceIDAndEmployeeCodeWithStoredProcedure(string InstanceID, string EmployeeCode, string sp) { DataProvider dataProvider = new DataProvider(); dataProvider.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["BPMConnectionString"].ConnectionString; BFEmployee bfEmployee = new BFEmployee(); Employee employeeInfo = new Employee(); WF_WorkFlowInstance wFlowInst = new WF_WorkFlowInstance(); BFApprovalRecord bFApprovalRecord = new BFApprovalRecord(); EmployeeAdditional employeeAddition = bfEmployee.GetEmployeeAdditionalById(EmployeeCode); employeeInfo = bfEmployee.GetEmployeeByEmployeeCode(EmployeeCode); string EmployeeName = bfEmployee.GetEmployeeNameByEmployeeCode(EmployeeCode); WorkFlowInstance wFlowInstanceBefore = new WorkFlowInstance(); wFlowInstanceBefore = wFlowInst.GetWorkFlowInstanceById(InstanceID); WorkFlowInstance newWorkFlowInstance = new WorkFlowInstance(); { newWorkFlowInstance.InstanceId = Guid.NewGuid().ToString(); newWorkFlowInstance.AppId = wFlowInstanceBefore.AppId; newWorkFlowInstance.FormId = BPMHelp.GetSerialNumber("SQ_"); newWorkFlowInstance.WfInstanceId = wFlowInstanceBefore.WfInstanceId; newWorkFlowInstance.OrderNo = wFlowInstanceBefore.OrderNo; newWorkFlowInstance.IsDel = 0; newWorkFlowInstance.CreateByUserCode = EmployeeCode; newWorkFlowInstance.CreateByUserName = EmployeeName; newWorkFlowInstance.CreateAtTime = System.DateTime.Now; newWorkFlowInstance.UpdateByUserCode = EmployeeCode; newWorkFlowInstance.UpdateByUserName = EmployeeName; newWorkFlowInstance.UpdateAtTime = wFlowInstanceBefore.UpdateAtTime; newWorkFlowInstance.CreateDeptCode = employeeInfo.DepartCode; newWorkFlowInstance.CreateDeptName = employeeInfo.DepartName; newWorkFlowInstance.WorkItemCode = wFlowInstanceBefore.WorkItemCode; newWorkFlowInstance.WorkItemName = wFlowInstanceBefore.WorkItemName; newWorkFlowInstance.WfTaskId = wFlowInstanceBefore.WfTaskId; newWorkFlowInstance.FinishedTime = null; newWorkFlowInstance.Remark = wFlowInstanceBefore.Remark; newWorkFlowInstance.FormTitle = wFlowInstanceBefore.FormTitle; newWorkFlowInstance.WfStatus = "0"; newWorkFlowInstance.SumitTime = null; newWorkFlowInstance.FormData = wFlowInstanceBefore.FormData; } var newApprovalRecord = new Pkurg.PWorldBPM.Business.Sys.WF_Approval_Record(); newApprovalRecord.ApprovalID = Guid.NewGuid().ToString(); newApprovalRecord.FormID = newWorkFlowInstance.FormId; newApprovalRecord.InstanceID = newWorkFlowInstance.InstanceId; newApprovalRecord.CreateByUserCode = employeeInfo.EmployeeCode; newApprovalRecord.CreateByUserName = employeeInfo.EmployeeName; newApprovalRecord.CreateAtTime = System.DateTime.Now; newApprovalRecord.ApproveByUserCode = employeeInfo.EmployeeCode; newApprovalRecord.ApproveByUserName = employeeInfo.EmployeeName; newApprovalRecord.UpdateByUserCode = employeeInfo.EmployeeCode; newApprovalRecord.UpdateByUserName = employeeInfo.EmployeeName; newApprovalRecord.UpdateAtTime = wFlowInstanceBefore.UpdateAtTime; newApprovalRecord.CurrentActiveName = "拟稿"; Pkurg.BPM.Entities.FlowRelated relationInfo = new FlowRelated() { FlowId = newWorkFlowInstance.InstanceId, CreatorName = employeeInfo.EmployeeName, CreateTime = System.DateTime.Now, CreatorId = employeeInfo.EmployeeCode, RelatedFlowId = wFlowInstanceBefore.InstanceId, RelatedFlowCreator = wFlowInstanceBefore.CreateByUserName, RelatedFlowEndTime = wFlowInstanceBefore.FinishedTime, RelatedFlowName = wFlowInstanceBefore.FormTitle, }; WF_Relation.AddRelatedFlowInfo(relationInfo); SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@FormID_Before", System.Data.SqlDbType.NVarChar, 100), new SqlParameter("@FormID_New", System.Data.SqlDbType.NVarChar, 100) }; parameters[0].Value = wFlowInstanceBefore.FormId; parameters[1].Value = newWorkFlowInstance.FormId; dataProvider.ExecutedProcedure(sp, parameters); bool isSuccessForInstance = wFlowInst.AddWorkFlowInstance(newWorkFlowInstance); bool isSuccessForApprovalRecord = bFApprovalRecord.AddApprovalRecord(newApprovalRecord); if (isSuccessForInstance && isSuccessForApprovalRecord) { return(true); } else { return(false); } }
private static string GetERPPageUrlByInstId(string id) { WF_WorkFlowInstance wf_WorkFlowInstance = new WF_WorkFlowInstance(); Pkurg.BPM.Entities.WorkFlowInstance inst = wf_WorkFlowInstance.GetWorkFlowInstanceById(id); if (inst == null) { throw new ArgumentException("id参数不正确"); } string erpFormId = ""; string erpFormType = ""; switch (inst.AppId) { //补充协议 case "2004": var supplementalAgreementinfo = Pkurg.PWorldBPM.Business.BIZ.ERP.SupplementalAgreement.GetModelByInstId(id); if (supplementalAgreementinfo == null) { ExceptionHander.GoToErrorPage("IFrameHelper GetERPPageUrlByInstId"); return(null); } erpFormId = supplementalAgreementinfo.ErpFormId; erpFormType = supplementalAgreementinfo.ErpFormType; break; //ERP付款申请单 case "10105": var paymentApplication = Pkurg.PWorldBPM.Business.BIZ.ERP.PaymentApplication.GetPaymentApplicationInfoByInstanceId(id); if (paymentApplication == null) { ExceptionHander.GoToErrorPage("IFrameHelper GetERPPageUrlByInstId"); return(null); } erpFormId = paymentApplication.ErpFormId; erpFormType = paymentApplication.ErpFormType; break; //ERP请示单 case "10107": var instruction = Pkurg.PWorldBPM.Business.BIZ.ERP.Instruction.GetInstructionInfoByInstanceId(id); if (instruction == null) { ExceptionHander.GoToErrorPage("IFrameHelper GetERPPageUrlByInstId"); return(null); } erpFormId = instruction.ErpFormId; erpFormType = instruction.ErpFormType; break; //合同审批 case "10109": var info = Pkurg.PWorldBPM.Business.BIZ.ERP.ContractApproval.GetModelByInstId(id); if (info == null) { ExceptionHander.GoToErrorPage("IFrameHelper GetERPPageUrlByInstId"); return(null); } erpFormId = info.ErpFormId; erpFormType = info.ErpFormType; break; //合同结算 case "10111": //通过instanceid得到formid,再得到实体 var contractfinalaccountinfo = DBContext.GetBizContext().ERP_ContractFinalAccount.FirstOrDefault(x => x.FormID == inst.FormId); if (contractfinalaccountinfo == null) { ExceptionHander.GoToErrorPage("IFrameHelper GetERPPageUrlByInstId"); return(null); } //相关参数 erpFormId = contractfinalaccountinfo.ErpFormId; erpFormType = contractfinalaccountinfo.ErpFormType; break; // case "3027": //通过instanceid得到formid,再得到实体 var contractbinfo = DBContext.GetBizContext().ERP_ContractPlanningBalance.FirstOrDefault(x => x.FormID == inst.FormId); if (contractbinfo == null) { ExceptionHander.GoToErrorPage("IFrameHelper GetERPPageUrlByInstId"); return(null); } //相关参数 erpFormId = contractbinfo.ErpFormId; erpFormType = contractbinfo.ErpFormType; break; default: break; } return(GetERPPageUrl(erpFormId, erpFormType)); }
private void InintData() { string methodName = "InintData"; try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); PaymentApplicationInfo item = PaymentApplication.GetPaymentApplicationInfoByInstanceId(ViewState["InstanceID"].ToString()); if (item != null) { PaymentApplicationInfo info = PaymentApplication.GetPaymentApplicationInfo(Instance.FormId); Department deptInfo = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(info.StartDeptId); ddlDepartName.Text = deptInfo.Remark; cblisoverCotract.Checked = info.IsOverContract == 1; cbChairman.Checked = info.IsCheckedChairman == 1; if (info.StartDeptId.Contains("S972")) { lbPresident.Text = "总经理意见:"; } else { lbPresident.Text = "总裁意见:"; } //LoadRelationPerson(info.StartDeptId); //cbRelatonUsers.Visible = cbPayer.Checked; //cbRelatonUsers.Enabled = false; //if (!string.IsNullOrEmpty(info.LeadersSelected)) //{ // string[] cbDatas = info.LeadersSelected.Split(','); // foreach (var cbItem in cbDatas) // { // ListItem listItem = cbRelatonUsers.Items.FindByValue(cbItem); // listItem.Selected = true; // } //} } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); ApproveOpinionUCDeptleader.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCRealateDept.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUCLeader.InstanceId = ViewState["InstanceID"].ToString(); Option_4.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC1.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC2.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC22.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC3.InstanceId = ViewState["InstanceID"].ToString(); Option_0.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC4.InstanceId = ViewState["InstanceID"].ToString(); Option_10.InstanceId = ViewState["InstanceID"].ToString(); Option_11.InstanceId = ViewState["InstanceID"].ToString(); Option_12.InstanceId = ViewState["InstanceID"].ToString(); Option_13.InstanceId = ViewState["InstanceID"].ToString(); } catch (Exception ex) { Logger.Write(this.GetType(), EnumLogLevel.Fatal, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.Exception + ":" + string.Format("Exception={0}", ex)); throw ex; } Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
private void BindFormData() { string methodName = "BindFormData"; try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } JC_BidScalingInfo obj = bs.GetBidScaling(Instance.FormId.ToString()); if (obj == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (obj != null) { tbDepartName.Text = obj.DeptName;; tbTitle.Text = obj.Title; tbDateTime.Text = obj.DateTime; tbContent.Text = obj.Content.Replace(" ", " ").Replace("\n", "<br/>"); tbEntranceTime.Text = obj.EntranceTime; cblIsAccreditByGroup.SelectedValue = obj.IsAccreditByGroup != null?obj.IsAccreditByGroup.ToString() : "-1"; if (obj.DeptName.Contains("开封")) { cblFirstLevel.Visible = true; cblFirstLevel.SelectedValue = obj.FirstLevel != null?obj.FirstLevel.ToString() : "-1"; } tbFirstUnit.Text = obj.FirstUnit; tbSecondUnit.Text = obj.SecondUnit; tbScalingResult.Text = obj.ScalingResult; string StartDeptId = obj.StartDeptCode; if (StartDeptId.Substring(0, StartDeptId.LastIndexOf('-')) == PKURGICode) { trCounterSign.Visible = false; lbIsImpowerProject.Visible = false; cblIsAccreditByGroup.Visible = false; } BindSelectUnit(Instance.FormId.ToString()); } FlowRelated1.ProcId = ViewState["InstanceID"].ToString(); Countersign1.ProcId = ViewState["InstanceID"].ToString(); Countersign_Group1.ProcId = ViewState["InstanceID"].ToString(); UploadAttachments1.ProcId = ViewState["InstanceID"].ToString(); #region 审批意见框 ApproveOpinionUC1.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC2.InstanceId = ViewState["InstanceID"].ToString(); OpinionExecutiveDirector.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC3.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC4.InstanceId = ViewState["InstanceID"].ToString(); #endregion } catch (Exception ex) { Logger.Write(this.GetType(), EnumLogLevel.Fatal, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.Exception + ":" + string.Format("Exception={0}", ex)); throw ex; } Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
private void BindFormData() { string methodName = "BindFormData"; try { WorkFlowInstance Instance = wf_WorkFlowInstance.GetWorkFlowInstanceById(ViewState["InstanceID"].ToString()); if (Instance == null) { ExceptionHander.GoToErrorPage("记录不存在"); } BP_LeaseContractInfo item = lc.GetLeaseContract(Instance.FormId.ToString()); if (item == null) { ExceptionHander.GoToErrorPage("记录不存在"); } if (item != null) { cblSecurityLevel.SelectedValue = item.SecurityLevel != null?item.SecurityLevel.ToString() : "-1"; cblUrgentLevel.SelectedValue = item.UrgenLevel != null?item.UrgenLevel.ToString() : "-1"; tbData.Text = ((DateTime)item.Date).ToString("yyyy-MM-dd"); tbPerson.Text = item.UserName; tbDepartName.Text = item.DeptName; tbPhone.Text = item.Mobile; tbTitle.Text = item.ReportTitle; tbContent.Text = item.Url; tbReportCode.Text = item.ReportCode; tbReason.Text = item.Reason; tbRemark.Text = item.Remark; cblDecorationContract.SelectedValue = item.DecorationContract != null?item.DecorationContract.ToString() : "-1"; cblServiceContract.SelectedValue = item.ServiceContract != null?item.ServiceContract.ToString() : "-1"; cblCompensationContract.SelectedValue = item.CompensationContract != null?item.CompensationContract.ToString() : "-1"; cblModificationContract.SelectedValue = item.ModificationContract != null?item.ModificationContract.ToString() : "-1"; cblSupplementContract.SelectedValue = item.SupplementContract != null?item.SupplementContract.ToString() : "-1"; cblLesseeContract.SelectedValue = item.LesseeContract != null?item.LesseeContract.ToString() : "-1"; } #region 审批意见框 ApproveOpinionUC1.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC2.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC3.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC4.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC5.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC6.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC7.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC8.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC9.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC10.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC11.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC12.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC13.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC14.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC13.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC16.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC17.InstanceId = ViewState["InstanceID"].ToString(); ApproveOpinionUC18.InstanceId = ViewState["InstanceID"].ToString(); #endregion } catch (Exception ex) { Logger.Write(this.GetType(), EnumLogLevel.Fatal, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.Exception + ":" + string.Format("Exception={0}", ex)); throw ex; } Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
public BPMBase(string instanceId) { _BPMContext = new BPMContext(); workFlowInstance = wf_WorkFlowInstance.GetWorkFlowInstanceById(instanceId); }