protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitStartDeptment(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("OA_Custom_"); FormTitle = SysContext.WF_AppDict.FirstOrDefault(x => x.AppId == AppID).AppName; StartDeptId = ddlDepartName.SelectedItem.Value; } else { Pkurg.PWorldBPM.Business.Sys.WF_WorkFlowInstance info = SysContext.WF_WorkFlowInstance.FirstOrDefault(x => x.InstanceID == instId); FormId = info.FormID; FormTitle = info.FormTitle; InitFormData(); } tbPhone.Text = _BPMContext.CurrentPWordUser.MobilePhone; tbPerson.Text = _BPMContext.CurrentPWordUser.EmployeeName; tbDate.Text = DateTime.Now.ToShortDateString(); } else { } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitApproveList(); WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); if (info != null) { ViewState["FormID"] = info.FormId; BindFormData(); SetUserControlInstance(); } } else { FormId = BPMHelp.GetSerialNumber("HR_CR_"); tbReportCode.Text = FormId; } InitLeader(); if (chkCadresOrRemoval.SelectedIndex != -1) { tbCadre.Visible = chkCadresOrRemoval.SelectedIndex != 1 ? true : false; tbRemoval.Visible = chkCadresOrRemoval.SelectedIndex != 0 ? true : false; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //初始化起始部门 InitStartDeptment(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { //得到序列号(FormId) FormId = BPMHelp.GetSerialNumber("ERP_JS_"); //设置标题 FormTitle = ContractApproval_Common.GetErpFormTitle(this); StartDeptId = ddlDepartName.SelectedItem.Value; //判断该流程是否存在【根据erpFormId判断】 if (Pkurg.PWorldBPM.Business.BIZ.ERP.ERP_Common.IsExsitRunFlow(Request["erpFormId"], ERP_WF_T_Name.ERP_ContractFinalAccount)) { ERP_CallbackResultType resultType = new ERP_ContractFinalAccount_Service().NotifyStartAdvance(Request["erpFormId"], true); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip + "'); window.opener=null;window.open('', '_self', '');window.close();", true); return; } } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; //初始化表单数据 InitFormData(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitStartDeptment(); InitApproveList(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("HR_EN_"); StartDeptId = ddlDeptName.SelectedItem.Value; tbReportCode.Text = FormId; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; InitFormData(); } InitLeader(); } }
//public new string AppID = "2004"; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitStartDeptment(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("ERP_SA_"); FormTitle = ContractApproval_Common.GetErpFormTitle(this);//设置标题 StartDeptId = ddlDepartName.SelectedItem.Value; if (Pkurg.PWorldBPM.Business.BIZ.ERP.ERP_Common.IsExsitRunFlow(Request["erpFormId"], ERP_WF_T_Name.ERP_SupplementalAgreement)) { ERP_CallbackResultType resultType = new ContractApproval_Service().NotifyStartAdvance(Request["erpFormId"], true); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip_BPM + "'); window.opener=null;window.open('', '_self', '');window.close();", true); return; } } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; InitFormData(); //Countersign1.CounterSignDeptId = StartDeptId; } //detailContract.InnerHtml = string.Format("<a href='{0}'>原合同详细信息</a>", SupplementalAgreement_Common.GetPoUrl()); } }
protected void Page_Load(object sender, EventArgs e) { //防止二次提交 ScriptManager.RegisterOnSubmitStatement(Page, typeof(Page), "Go_disabled", "disabledButton('lbAgree');disabledButton('lbReject');disabledButton('lbSubmit');"); ScriptManager.RegisterStartupScript(Page, typeof(Page), "Clear_disabled", "enableButton('lbAgree');enableButton('lbReject');enableButton('lbSubmit');", true); if (!IsPostBack) { FormTitle = "员工离职\\调动转单"; string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { //得到序列号(FormId) FormId = BPMHelp.GetSerialNumber("HR_EL_"); } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; //初始化表单数据 InitFormData(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { tbQualityScore1.Attributes.Add("onBlur", "Check(this,5);"); tbQualityScore2.Attributes.Add("onBlur", "Check(this,5);"); tbQualityScore3.Attributes.Add("onBlur", "Check(this,20);"); tbQualityScore4.Attributes.Add("onBlur", "Check(this,7.5);"); tbQualityScore5.Attributes.Add("onBlur", "Check(this,7.5);"); tbQualityScore6.Attributes.Add("onBlur", "Check(this,7.5);"); tbQualityScore7.Attributes.Add("onBlur", "Check(this,7.5);"); tbQualityScore8.Attributes.Add("onBlur", "Check(this,10);"); tbQualityScore9.Attributes.Add("onBlur", "Check(this,10);"); tbQualityScore10.Attributes.Add("onBlur", "Check(this,15);"); InitApproveList(); StartDeptId = _BPMContext.CurrentUser.MainDeptId; string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("HR_ER_"); tbReportCode.Text = FormId; } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; InitFormData(); } InitLeader(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitDepartName(); WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); if (info != null) { ViewState["FormID"] = info.FormId; BindFormData(); SetUserControlInstance(); } } else { FormId = BPMHelp.GetSerialNumber("OA_IQS_"); tbReportCode.Text = FormId; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); tbUserName.Text = CurrentEmployee.EmployeeName; tbMobile.Text = CurrentEmployee.MobilePhone; cbAP.Checked = true; cbVP.Checked = true; cbChairman.Checked = true; } InitLeader(); InitCheckBoxList(); Countersign1.CounterSignDeptId = GroupCode;//集团作为会签基准部门 } }
protected void Page_Load(object sender, EventArgs e) { string methodName = "Page_Load"; Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.IN); if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["max"])) { txtTotalPrice.Text = Request.QueryString["max"]; } InitDepartName(); if (ddlDepartName.Items.Count < 1) { RunJs(this.Page, "alert('您没有发起该流程权限!请联系管理员');window.close();"); return; } WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); if (info != null) { ViewState["FormID"] = info.FormId; BindFormData(); } } else { tbNumber.Text = BPMHelp.GetSerialNumber("JC_");; ViewState["FormID"] = tbNumber.Text; tbPerson.Text = CurrentEmployee.EmployeeName; tbPhone.Text = CurrentEmployee.OfficePhone; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); if (!string.IsNullOrEmpty(Request.QueryString["ORDERTYPE"])) { tbOrderType.Text = Request.QueryString["ORDERTYPE"]; } if (!string.IsNullOrEmpty(Request.QueryString["ORDERID"])) { tbOrderID.Text = Request.QueryString["ORDERID"]; } if (!string.IsNullOrEmpty(Request.QueryString["URL"])) { tbContent.Text = Request.QueryString["URL"]; } if (!string.IsNullOrEmpty(Request.QueryString["TITLE"])) { tbTitle.Text = Request.QueryString["TITLE"]; } } string StartDeptId = ddlDepartName.SelectedItem.Value; Countersign1.CounterSignDeptId = StartDeptId; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitStartDeptment(); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); FormId = info.FormId; InitFormData(); SetUserControlInstance(); } else { string erpFormId = HttpContext.Current.Request["erpFormId"]; string erpFormType = HttpContext.Current.Request["erpFormType"]; if (string.IsNullOrEmpty(erpFormId) || string.IsNullOrEmpty(erpFormType)) { //参数错误 ExceptionHander.GoToErrorPage(); return; } if (Pkurg.PWorldBPM.Business.BIZ.ERP.ERP_Common.IsExsitRunFlow(Request["erpFormId"], ERP_WF_T_Name.ERP_PaymentApplication)) { ERP_CallbackResultType resultType = new ContractApproval_Service().NotifyStartAdvance(Request["erpFormId"], true); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip_BPM + "'); window.opener=null;window.open('', '_self', '');window.close();", true); return; } ContractID = BPMHelp.GetSerialNumber("ERP_FK_"); FormId = ContractID; StartDeptId = ddlDepartName.SelectedItem.Value; LoadRelationPerson(); Countersign1.CounterSignDeptId = StartDeptId; } } //如果起始部门为“营销管理部”,则计划内外的控件隐藏 if (ddlDepartName.SelectedItem.Text.Contains("营销")) { //cblIsInPan.Visible = true; IsInPan.Visible = true; } else { //cblIsInPan.Visible = false; IsInPan.Visible = false; cblIsInPan.SelectedItem.Value = "0"; } }
protected void Page_Load(object sender, EventArgs e) { //if (!IsPostBack) //{ // //get worklists // Worklist li = WorkflowHelper.GetWorklistItem(Page.User.Identity.Name); // foreach (WorklistItem lit in li) // { // //显示的单号 // //lit.ProcessInstance.Folio // } //} string methodName = "Page_Load"; string currentUser = new IdentityUser().GetEmployee().LoginId; ViewState["loginName"] = currentUser; Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.IN); if (!IsPostBack) { UploadAttachments1._BPMContext.LoginId = currentUser; BFEmployee bfEmployee = new BFEmployee(); EmployeeAdditional employeeaddInfo = bfEmployee.GetEmployeeAdditionalByLoginName(currentUser); currentEmployee = bfEmployee.GetEmployeeByEmployeeCode(employeeaddInfo.EmployeeCode); WorkflowHelper.CurrentUser = currentUser; Session["CurrentEmployee"] = currentEmployee; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); ViewState["FormID"] = info.FormId; InintData(); } else { ContractID = BPMHelp.GetSerialNumber("SQ_"); tbNumber.Text = ContractID; ViewState["FormID"] = ContractID; tbPerson.Text = CurrentEmployee.EmployeeName; tbDepartName.Text = CurrentEmployee.DepartName; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); Countersign1.CounterSignDeptId = CurrentEmployee.DepartCode; } InintLeader(); } //Countersign1.SimulateUser = ViewState["loginName"].ToString(); //FlowRelated1.SimulateUser = ViewState["loginName"].ToString(); Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); }
/// <summary> /// 页面初始化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { //防止二次提交 ScriptManager.RegisterOnSubmitStatement(Page, typeof(Page), "Go_disabled", "disabledButton('lbAgree');disabledButton('lbReject');disabledButton('lbSubmit');"); ScriptManager.RegisterStartupScript(Page, typeof(Page), "Clear_disabled", "enableButton('lbAgree');enableButton('lbReject');enableButton('lbSubmit');", true); if (!IsPostBack) { //初始化起始部门 InitStartDeptment(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { //得到表单编号 FormId = BPMHelp.GetSerialNumber("RWSP_"); //得到起始部门列表 StartDeptId = ddlDepartName.SelectedItem.Value; Department deptInfo = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(StartDeptId); //根据登录名得到申请时间 tbDateTime.Text = DateTime.Now.ToString(); } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; //根据FormId初始化表单数据 InitFormData(FormId); //设置用户控制实例 SetUserControlInstance(); } if (ddlDepartName.SelectedItem.Text.Contains("开封")) { cblFirstLevel.Visible = true; } //根据发起部门来判断是属于集团还是子公司 if (StartDeptId.Contains("S363")) { cblIsImpowerProject.Visible = false; lbIsImpowerProject.Visible = false; zbcgOpinion.Visible = false; fwOpinion.Visible = false; } else { cblIsImpowerProject.Visible = true; lbIsImpowerProject.Visible = true; zbcgOpinion.Visible = true; fwOpinion.Visible = true; } } }
protected void Page_Load(object sender, EventArgs e) { string methodName = "Page_Load"; Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.IN); if (!IsPostBack) { string currentUser = new IdentityUser().GetEmployee().LoginId; UploadAttachments1._BPMContext.LoginId = currentUser; ViewState["IsSubmit"] = false; ViewState["loginName"] = currentUser.ToLower().Replace(@"k2:founder\", "").Replace(@"founder\", ""); WorkflowHelper.CurrentUser = ViewState["loginName"].ToString(); BFEmployee bfEmployee = new BFEmployee(); EmployeeAdditional employeeaddInfo = bfEmployee.GetEmployeeAdditionalByLoginName(ViewState["loginName"].ToString()); currentEmployee = bfEmployee.GetEmployeeByEmployeeCode(employeeaddInfo.EmployeeCode); Session["CurrentEmployee"] = currentEmployee; if (!string.IsNullOrEmpty(Request.QueryString["sn"])) { sn.Value = Request.QueryString["sn"]; WorklistItem listItem = WorkflowHelper.GetWorklistItemWithSN(sn.Value); taskID.Value = listItem.ID.ToString(); nodeID.Value = listItem.ActivityInstanceDestination.ActID.ToString(); nodeName.Value = listItem.ActivityInstanceDestination.Name; InitApproveOpinion(nodeName.Value); } if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); ViewState["FormID"] = info.FormId; InintData(); } else { ContractID = BPMHelp.GetSerialNumber("SQ_");; tbNumber.Text = ContractID; ViewState["FormID"] = ContractID; } //tbPerson.Text = CurrentEmployee.EmployeeName; } Countersign1.SimulateUser = ViewState["loginName"].ToString(); FlowRelated1.SimulateUser = ViewState["loginName"].ToString(); Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.OUT); ShowButton(); }
/// <summary> /// 页面初始化[页面第一次加载时就需要根据当前登录用户自动填写申请人,电话,日期,表单编号等内容] /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { //防止二次提交 ScriptManager.RegisterOnSubmitStatement(Page, typeof(Page), "Go_disabled", "disabledButton('lbAgree');disabledButton('lbReject');disabledButton('lbSubmit');"); ScriptManager.RegisterStartupScript(Page, typeof(Page), "Clear_disabled", "enableButton('lbAgree');enableButton('lbReject');enableButton('lbSubmit');", true); if (!IsPostBack) { //初始化起始部门 InitStartDeptment(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { //得到表单编号 FormId = BPMHelp.GetSerialNumber("ZBXQ_"); //得到起始部门列表 StartDeptId = ddlDepartName.SelectedItem.Value; Department deptInfo = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(StartDeptId); //根据登录名得到申请人的姓名,电话,以及当前时间 tbDateTime.Text = DateTime.Now.ToString(); tbUserName.Text = _BPMContext.CurrentPWordUser.EmployeeName; if (_BPMContext.CurrentPWordUser.MobilePhone == null) { tbMobile.Text = ""; } else { tbMobile.Text = _BPMContext.CurrentPWordUser.MobilePhone; } tbReportCode.Text = FormId; } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; //根据FormId初始化表单数据 InitFormData(FormId); //设置用户控制实例 SetUserControlInstance(); } //InitcbGroupRealateDept(); if (ddlDepartName.SelectedItem.Text.Contains("开封")) { cblFirstLevel.Visible = true; cblFirstLevel.SelectedIndex = 0; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //初始化起始部门 InitStartDeptment(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("OA_WYQS_"); FormTitle = SysContext.WF_AppDict.FirstOrDefault(x => x.AppId == AppID).AppName; StartDeptId = ddlDepartName.SelectedItem.Value; tbReportCode.Text = FormId; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); tbUserName.Text = CurrentEmployee.EmployeeName; tbMobile.Text = CurrentEmployee.MobilePhone; cbAP.Checked = true; cbVP.Checked = true; } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; InitFormData(); } } if (StartDeptId.Contains("S366-S976")) { Company.Visible = false; Group.Visible = true; Group1.Visible = false; IsReportToWY.Visible = false; //cblIsReportToWY.Visible = false; } else if (!StartDeptId.Contains("S366-S976")) { Company.Visible = true; Company1.Visible = true; Group.Visible = true; IsReportToGroup.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FormTitle = "实习生录用审批"; string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("HR_IE_"); } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; InitFormData(); } } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); InitFormData(); if (!IsPostBack) { if (_BPMContext.ProcInst == null) { SerialNumber = BPMHelp.GetSerialNumber("SQ_"); } else { SerialNumber = _BPMContext.ProcInst.FormId; } } }
protected void Page_Load(object sender, EventArgs e) { string methodName = "Page_Load"; Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.IN); if (!IsPostBack) { InitDepartName(); WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); if (info != null) { ViewState["FormID"] = info.FormId; BindFormData(); SetUserControlInstance(); } } else { FormId = BPMHelp.GetSerialNumber("ZBDB_"); tbDateTime.Text = DateTime.Now.ToShortDateString(); } string StartDeptId = ddlDepartName.SelectedItem.Value; if (StartDeptId.Substring(0, StartDeptId.LastIndexOf('-')) == PKURGICode) { trCounterSign.Visible = false; lbIsImpowerProject.Visible = false; cblIsAccreditByGroup.Visible = false; } if (ddlDepartName.SelectedItem.Text.Contains("开封")) { cblFirstLevel.Visible = true; cblFirstLevel.SelectedIndex = 0; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitStartDeptment(); if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); FormId = info.FormId; InitFormData(); //Countersign1.CounterSignDeptId = info.CreateDeptCode; SetUserControlInstance(); } else { string erpFormId = HttpContext.Current.Request["erpFormId"]; string erpFormType = HttpContext.Current.Request["erpFormType"]; if (string.IsNullOrEmpty(erpFormId) || string.IsNullOrEmpty(erpFormType)) { //参数错误 ExceptionHander.GoToErrorPage(); return; } if (Pkurg.PWorldBPM.Business.BIZ.ERP.ERP_Common.IsExsitRunFlow(Request["erpFormId"], ERP_WF_T_Name.ERP_Instruction)) { ERP_CallbackResultType resultType = new ContractApproval_Service().NotifyStartAdvance(Request["erpFormId"], true); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip_BPM + "'); window.opener=null;window.open('', '_self', '');window.close();", true); return; } FormId = BPMHelp.GetSerialNumber("ERP_QS_"); string StartDeptId = ddlDepartName.SelectedItem.Value; Department deptInfo = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(StartDeptId); Countersign1.CounterSignDeptId = StartDeptId; } InitLeader(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitApproveList(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("HR_SA_"); tbReportCode.Text = FormId; } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; InitFormData(); } InitLeader(); StartDeptId = _BPMContext.CurrentUser.MainDeptId; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //throw new Exception("这有错!!!"); InitStartDeptment(); string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("ERP_HT_"); FormTitle = ContractApproval_Common.GetErpFormTitle(this);//设置标题 StartDeptId = ddlDepartName.SelectedItem.Value; if (Pkurg.PWorldBPM.Business.BIZ.ERP.ERP_Common.IsExsitRunFlow(Request["erpFormId"], ERP_WF_T_Name.ERP_ContractApproval)) { ERP_CallbackResultType resultType = new ContractApproval_Service().NotifyStartAdvance(Request["erpFormId"], true); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ajax", "alert('" + ConstString.RepeatAlertTip_BPM + "'); window.opener=null;window.open('', '_self', '');window.close();", true); return; } } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; if (!InitFormData(FormId)) { return; } SetUserControlInstance(); Countersign1.CounterSignDeptId = StartDeptId; } } }
protected void Page_Load(object sender, EventArgs e) { string methodName = "Page_Load"; Logger.Write(this.GetType(), EnumLogLevel.Info, className + ":" + methodName + ":" + Pkurg.PWorldBPM.Common.Log.MessageType.IN); if (!IsPostBack) { InitDepartName(); if (ddlDepartName.Items.Count < 1) { RunJs(this.Page, "alert('您没有发起该流程权限!请联系管理员');window.close();"); return; } WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); if (info != null) { ViewState["FormID"] = info.FormId; BindFormData(); } } else { tbReportCode.Text = BPMHelp.GetSerialNumber("BP_"); ViewState["FormID"] = tbReportCode.Text; tbPerson.Text = CurrentEmployee.EmployeeName; tbPhone.Text = CurrentEmployee.OfficePhone; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); if (!string.IsNullOrEmpty(Request.QueryString["URL"])) { tbContent.Text = Request.QueryString["URL"]; } if (!string.IsNullOrEmpty(Request.QueryString["TITLE"])) { tbTitle.Text = Request.QueryString["TITLE"]; } if (!string.IsNullOrEmpty(Request.QueryString["bizType"])) { tbBizType.Text = Request.QueryString["bizType"]; if (Request.QueryString["bizType"] == "2") { cblSupplementContract.SelectedValue = "0"; cblSupplementContract.Enabled = false; } } if (!string.IsNullOrEmpty(Request.QueryString["bizId"])) { tbBizID.Text = Request.QueryString["bizId"]; } if (!string.IsNullOrEmpty(Request.QueryString["approveFlag"])) { tbApproveFlag.Text = Request.QueryString["approveFlag"]; } if (!string.IsNullOrEmpty(Request.QueryString["reason"])) { tbReason.Text = Request.QueryString["reason"]; } } string StartDeptId = ddlDepartName.SelectedItem.Value; } }
/// <summary> /// 保存表单 /// </summary> /// <returns></returns> private SystemDispatchInfo SaveFormData() { bool isEdit = false; SystemDispatchInfo info = null; try { info = SystemDispatch.GetSystemDispatchInfo(FormId); if (info == null) { info = new SystemDispatchInfo(); info.FormId = FormId; info.StartDeptId = ddlDepartName.SelectedItem.Value; info.DeptName = ddlDepartName.SelectedItem.Text; info.SecurityLevel = cblSecurityLevel.SelectedIndex.ToString(); info.UrgenLevel = cblUrgenLevel.SelectedIndex.ToString(); FormId = BPMHelp.GetSerialNumber("OA_ZD_"); info.FormId = FormId; info.DateTime = UpdatedTextBox.Value; info.UserName = tbUserName.Text; info.Mobile = tbMobile.Text; info.Title = tbTitle.Text; info.IsPublish = cblIsPublish.SelectedIndex.ToString(); info.RedHeadDocument = cblRedHeadDocument.SelectedIndex.ToString(); info.Content = tbContent.Text; info.LeadersSelected = strApprovers; } else { isEdit = true; info.FormId = FormId; info.StartDeptId = ddlDepartName.SelectedItem.Value; info.DeptName = ddlDepartName.SelectedItem.Text; info.SecurityLevel = cblSecurityLevel.SelectedIndex.ToString(); info.UrgenLevel = cblUrgenLevel.SelectedIndex.ToString(); info.FormId = tbReportCode.Text; info.DateTime = UpdatedTextBox.Value; info.UserName = tbUserName.Text; info.Mobile = tbMobile.Text; info.Title = tbTitle.Text; info.IsPublish = cblIsPublish.SelectedIndex.ToString(); info.RedHeadDocument = cblRedHeadDocument.SelectedIndex.ToString(); info.Content = tbContent.Text; info.LeadersSelected = strApprovers; } if (!isEdit) { SystemDispatch.InsertSystemDispatchInfo(info); } else { SystemDispatch.UpdateSystemDispatch(info); } } catch (Exception ex) { throw ex; } return(info); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //初始化起始部门 InitDepartName(); //合同类型 ddlContractType1.DataSource = ContractTypeInfosHelper.GetFirstContractTypeInfos1(); ddlContractType1.DataTextField = "value"; ddlContractType1.DataValueField = "key"; ddlContractType1.DataBind(); //合同主体 ddlContractSubject.DataSource = ContractSubjectHelper.GetContractSubjectInfos1(); ddlContractSubject.DataTextField = "value"; ddlContractSubject.DataValueField = "key"; ddlContractSubject.DataBind(); WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId; string instId = Request.QueryString["id"]; if (string.IsNullOrEmpty(instId)) { FormId = BPMHelp.GetSerialNumber("OA_WYHT_"); FormTitle = SysContext.WF_AppDict.FirstOrDefault(x => x.AppId == AppID).AppName; StartDeptId = ddlDepartName.SelectedItem.Value; tbReportCode.Text = FormId; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); tbUserName.Text = CurrentEmployee.EmployeeName; tbMobile.Text = CurrentEmployee.MobilePhone; cbAP.Checked = true; cbVP.Checked = true; if (ddlContractType1.Items.Count != 0) { ddlContractType1.SelectedIndex = 0; ddlContractType2.DataSource = ContractTypeInfosHelper.GetSecondContractTypeInfos1(ddlContractType1.SelectedItem.Value); ddlContractType2.DataTextField = "value"; ddlContractType2.DataValueField = "key"; ddlContractType2.DataBind(); if (ddlContractType2.Items.Count != 0) { ddlContractType2.SelectedIndex = 0; ddlContractType3.DataSource = ContractTypeInfosHelper.GetThirdContractTypeInfos1(ddlContractType2.SelectedItem.Value); ddlContractType3.DataTextField = "value"; ddlContractType3.DataValueField = "key"; ddlContractType3.DataBind(); } } //InitCheckBoxList(); } else { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId); FormId = info.FormId; FormTitle = info.FormTitle; //初始化表单数据 InitFormData(); } //判断分公司和物业集团显示 if (StartDeptId.Contains("S366-S976")) { Company.Visible = false; Group.Visible = true; Group1.Visible = false; IsReportToWY.Visible = false; //cblIsReportToWY.Visible = false; } else if (!StartDeptId.Contains("S366-S976")) { Company.Visible = true; Company1.Visible = true; Group.Visible = true; IsReportToGroup.Visible = false; } } }
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); } }
/// <summary> /// 加载页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { //防止二次提交 ScriptManager.RegisterOnSubmitStatement(Page, typeof(Page), "Go_disabled", "disabledButton('lbSave');disabledButton('lbSubmit');disabledButton('lbClose');"); ScriptManager.RegisterStartupScript(Page, typeof(Page), "Clear_disabled", "enableButton('lbSave');enableButton('lbSubmit');enableButton('lbClose');", true); if (!IsPostBack) { InitDepartName(); //合同类型 ddlContractType1.DataSource = ContractTypeInfosHelper.GetFirstContractTypeInfos(); ddlContractType1.DataTextField = "value"; ddlContractType1.DataValueField = "key"; ddlContractType1.DataBind(); //合同主体 ddlContractSubject.DataSource = ContractSubjectHelper.GetContractSubjectInfos(); ddlContractSubject.DataTextField = "value"; ddlContractSubject.DataValueField = "key"; ddlContractSubject.DataBind(); WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId; if (!string.IsNullOrEmpty(Request.QueryString["id"])) { WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(Request.QueryString["id"]); if (info != null) { ViewState["FormID"] = info.FormId; //绑定表单数据 BindFormDate(); //设置用户控制实例 SetUserControlInstance(); } } else { //投资公司的编码前缀为I FormId = BPMHelp.GetSerialNumber("OA_EHT_"); tbReportCode.Text = FormId; UpdatedTextBox.Value = DateTime.Now.ToShortDateString(); tbUserName.Text = CurrentEmployee.EmployeeName; tbMobile.Text = CurrentEmployee.MobilePhone; cbPresident.Checked = true; cbCFO.Checked = true; cbAP.Checked = true; cbVP.Checked = true; if (ddlContractType1.Items.Count != 0) { ddlContractType1.SelectedIndex = 0; ddlContractType2.DataSource = ContractTypeInfosHelper.GetSecondContractTypeInfos(ddlContractType1.SelectedItem.Value); ddlContractType2.DataTextField = "value"; ddlContractType2.DataValueField = "key"; ddlContractType2.DataBind(); if (ddlContractType2.Items.Count != 0) { ddlContractType2.SelectedIndex = 0; ddlContractType3.DataSource = ContractTypeInfosHelper.GetThirdContractTypeInfos(ddlContractType2.SelectedItem.Value); ddlContractType3.DataTextField = "value"; ddlContractType3.DataValueField = "key"; ddlContractType3.DataBind(); } } } InitLeader(); InitCheckBoxList(); } }