//是否正确

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string instId = Request.QueryString["ID"];
            if (!string.IsNullOrEmpty(instId))
            {
                WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
                ViewState["InstanceID"] = Request.QueryString["ID"];
                FormId = info.FormId;
                InitFormData();
                InitApproveOpinion();
            }
            else
            {
                ExceptionHander.GoToErrorPage();
            }

            if (!string.IsNullOrEmpty(Request.QueryString["type"]))
            {
                tbCompany.Visible          = false;
                tbCompanyCommittee.Visible = false;
                tbURL.Visible            = false;
                tbGroup.Visible          = true;
                tbGroupCommittee.Visible = cblIsImpowerProject.SelectedValue == "1" ? false : true;
            }
            else
            {
                tbCompanyCommittee.Visible = cblIsImpowerProject.SelectedValue == "1" ? true : false;
                tbPresident.Visible        = cblIsImpowerProject.SelectedValue == "0" ? true : false;
            }
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ///加载页面数据
            string instId = Request.QueryString["id"];
            if (!string.IsNullOrEmpty(instId))
            {
                WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
                FormId    = info.FormId;
                FormTitle = info.FormTitle;
                InitFormData();
            }
            else
            {
                ExceptionHander.GoToErrorPage();
            }
            if (K2_TaskItem.ActivityInstanceDestination.Name == "员工意见")
            {
                cblTransferReason.Enabled = true;
            }
        }

        ShowButton();

        SetMenu();
    }
Ejemplo n.º 3
0
    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();
        }
    }
Ejemplo n.º 4
0
        //GetPaymentApplicationInfo

        public static PaymentApplicationInfo GetPaymentApplicationInfoByInstanceId(string id)
        {
            WorkFlowInstance instance = new WF_WorkFlowInstance().GetWorkFlowInstanceById(id);

            if (instance != null)
            {
                string formId = instance.FormId;
                return(GetPaymentApplicationInfo(formId));
            }
            return(null);

            //待改造
            //SqlParameter[] parameters = {
            //        new SqlParameter("@ID", SqlDbType.NVarChar,100)			};
            //parameters[0].Value = id;


            //DataTable dt = GeDataProvider().ExecutedProcedure("Biz.ERP_ContractApproval_GetModelByInstId", parameters);
            //if (dt != null && dt.Rows.Count > 0)
            //{
            //    return DataRowToModel(dt);
            //}
            //else
            //{
            //    return null;
            //}
        }
Ejemplo n.º 5
0
    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();
            }
        }
    }
    //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());
        }
    }
Ejemplo n.º 7
0
    /// <summary>
    /// 页面初始化
    /// </summary>
    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     StartDeptId = ddlDepartName.SelectedItem.Value;
                Department deptInfo    = new Pkurg.PWorld.Services.DepartmentService().GetByDepartCode(StartDeptId);
                Countersign1.CounterSignDeptId = StartDeptId;
                FormId = string.Empty;
            }
            InitCheckBoxList();
            InitLeader();
            InitForm();
        }
    }
Ejemplo n.º 8
0
    public static string GetPoUrl()
    {
        string erpPoId = HttpContext.Current.Request["erpPoId"];
        string id      = HttpContext.Current.Request["ID"];

        if (!string.IsNullOrEmpty(id))
        {
            SupplementalAgreementInfo saInfo = Pkurg.PWorldBPM.Business.BIZ.ERP.SupplementalAgreement.GetModelByInstId(id);
            if (saInfo == null)
            {
                return("");
            }
            erpPoId = saInfo.RelationContract;
        }
        else
        {
            if (string.IsNullOrEmpty(erpPoId))
            {
                return("");
            }
        }

        string baseUrl            = "/Workflow/ViewPage/V_ERP_ContractApproval.aspx?id=";
        ContractApprovalInfo info = Pkurg.PWorldBPM.Business.BIZ.ERP.ContractApproval.GetRecentlyInfoByERPCode(erpPoId);

        if (info != null)
        {
            WorkFlowInstance instance = new WF_WorkFlowInstance().GetWorkFlowInstanceByFormId(info.FormID);
            return(baseUrl + instance.InstanceId);
        }

        return(HttpUtility.HtmlEncode("javascript:alert('BPM系统中没有其相关合同');this.close();"));
    }
Ejemplo n.º 9
0
    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();
            }
        }
    }
Ejemplo n.º 10
0
 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();
     }
 }
Ejemplo n.º 11
0
 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;
         }
     }
 }
Ejemplo n.º 12
0
 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;//集团作为会签基准部门
     }
 }
Ejemplo n.º 13
0
    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;
        }
    }
Ejemplo n.º 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["sn"]))
            {
                WorkflowHelper.CurrentUser = "******" + _BPMContext.CurrentUser.LoginId;
                sn.Value = Request.QueryString["sn"];
                WorklistItem listItem = WorkflowHelper.GetWorklistItemWithSN(sn.Value, "founder\\" + _BPMContext.CurrentUser.LoginId);
                taskID.Value   = listItem.ID.ToString();
                nodeID.Value   = listItem.ActivityInstanceDestination.ActID.ToString();
                nodeName.Value = listItem.ActivityInstanceDestination.Name;
            }
            ///加载页面数据
            string instId = Request.QueryString["id"];
            if (!string.IsNullOrEmpty(instId))
            {
                WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
                FormId    = info.FormId;
                FormTitle = info.FormTitle;
                InitFormData();
            }
            else
            {
                ExceptionHander.GoToErrorPage();
            }
        }
        //初始化勾选部门
        InitCheckButton();
        ShowButton();
        SetMenu();

        //判断分公司和物业集团显示
        if (StartDeptId.Contains("S366-S976"))
        {
            Company.Visible      = false;
            Group.Visible        = true;
            Group1.Visible       = false;
            IsReportToWY.Visible = false;
        }
        else if (!StartDeptId.Contains("S366-S976") && cblIsReportToWY.SelectedItem.Value == "1")
        {
            Company.Visible         = true;
            Company1.Visible        = true;
            Group.Visible           = true;
            IsReportToGroup.Visible = false;
        }
        else if (!StartDeptId.Contains("S366-S976") && cblIsReportToWY.SelectedItem.Value == "0")
        {
            Company.Visible         = true;
            Company1.Visible        = false;
            Group.Visible           = false;
            IsReportToGroup.Visible = false;
        }
    }
Ejemplo n.º 15
0
    /// <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;
            }
        }
    }
Ejemplo n.º 16
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);
    }
Ejemplo n.º 17
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();

                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";
        }
    }
Ejemplo n.º 18
0
    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();
    }
Ejemplo n.º 19
0
    protected override string GetErpFormIdByWorkflowId(int k2_workflowId, SerializableDictionary <string, string> dataFields)
    {
        string id = k2_workflowId.ToString();
        WF_WorkFlowInstance wf_WorkFlowInstance = new WF_WorkFlowInstance();
        var inst = DBContext.GetSysContext().WF_WorkFlowInstance.FirstOrDefault(x => x.WFInstanceId == id);
        var contractfinalaccountinfo = DBContext.GetBizContext().ERP_ContractFinalAccount.FirstOrDefault(x => x.FormID == inst.FormID);

        string erpFormCode = contractfinalaccountinfo.ErpFormId;

        return(erpFormCode);
    }
Ejemplo n.º 20
0
        public static SystemDispatchInfo GetSystemDispatchInfoByInstanceId(string id)
        {
            WorkFlowInstance instance = new WF_WorkFlowInstance().GetWorkFlowInstanceById(id);

            if (instance != null)
            {
                string formId = instance.FormId;
                return(GetSystemDispatchInfo(formId));
            }
            return(null);
        }
Ejemplo n.º 21
0
        public static FixedAssetAllocationInfo GetFixedAssetAllocationInfoByInstanceId(string id)
        {
            WorkFlowInstance instance = new WF_WorkFlowInstance().GetWorkFlowInstanceById(id);

            if (instance != null)
            {
                string formId = instance.FormId;
                return(GetFixedAssetAllocationInfo(formId));
            }
            return(null);
        }
Ejemplo n.º 22
0
    /// <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;
            }
        }
    }
Ejemplo n.º 23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ///加载页面数据
            string instId = Request.QueryString["id"];
            if (!string.IsNullOrEmpty(instId))
            {
                WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
                FormId    = info.FormId;
                FormTitle = info.FormTitle;
                InitFormData();
            }
            else
            {
                ExceptionHander.GoToErrorPage();
            }
        }
        if (K2_TaskItem.ActivityInstanceDestination.Name == "员工意见")
        {
            tbPost.ReadOnly        = false;
            tbAchievement.ReadOnly = false;
            tbSign.ReadOnly        = false;
            tbSignDate.Disabled    = false;
        }
        else
        {
            tb360.Visible       = true;
            tbSignDate.Disabled = true;
        }

        if (K2_TaskItem.ActivityInstanceDestination.Name == "用人部门意见")
        {
            ddlWorkCompletion.Enabled = true;
            ddlIsAgreeRegular.Enabled = true;
            tbAdvantage.ReadOnly      = false;
            tbDisadvantage.ReadOnly   = false;
            tbSuggest.ReadOnly        = false;
        }
        else
        {
            ddlWorkCompletion.Enabled = false;
            ddlIsAgreeRegular.Enabled = false;
        }

        ShowButton();
        SetMenu();
    }
Ejemplo n.º 24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ///加载页面数据
            string instId = Request.QueryString["id"];
            if (!string.IsNullOrEmpty(instId))
            {
                WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
                FormId    = info.FormId;
                FormTitle = info.FormTitle;
                InitFormData();
            }
            else
            {
                ExceptionHander.GoToErrorPage();
            }
        }

        InitCheckButton();

        ShowButton();

        SetMenu();

        //判断分公司和物业集团显示
        if (StartDeptId.Contains("S366-S976"))
        {
            Company.Visible      = false;
            Group.Visible        = true;
            Group1.Visible       = false;
            IsReportToWY.Visible = false;
        }
        else if (!StartDeptId.Contains("S366-S976") && cblIsReportToWY.SelectedItem.Value == "1")
        {
            Company.Visible         = true;
            Company1.Visible        = true;
            Group.Visible           = true;
            IsReportToGroup.Visible = false;
        }
        else if (!StartDeptId.Contains("S366-S976") && cblIsReportToWY.SelectedItem.Value == "0")
        {
            Company.Visible         = true;
            Company1.Visible        = false;
            Group.Visible           = false;
            IsReportToGroup.Visible = false;
        }
    }
Ejemplo n.º 25
0
    /// <summary>
    /// 页面加载
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ///加载页面数据
            string instId = Request.QueryString["id"];

            if (!string.IsNullOrEmpty(instId))
            {
                WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
                FormId    = info.FormId;
                FormTitle = info.FormTitle;
                InitFormData();
            }
            else
            {
                ExceptionHander.GoToErrorPage();
            }

            string currentActiveName = K2_TaskItem.ActivityInstanceDestination.Name;
            if (currentActiveName == "员工意见")
            {
                Reminding.Visible = true;

                if (cbEmployee.Checked == true)
                {
                    tbHandover.ReadOnly  = false;
                    tbRecipient.ReadOnly = false;
                }
            }

            if (currentActiveName == "用人部门负责人意见")
            {
                DeptRemind.Visible = true;
            }

            if (currentActiveName == "相关部门接口人意见")
            {
                DeptRemind.Visible = true;
            }
        }


        ShowButton();

        SetMenu();
    }
Ejemplo n.º 26
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;
        }
    }
Ejemplo n.º 27
0
    /// <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)
        {
            //加载页面
            string instId = Request.QueryString["id"];
            if (!string.IsNullOrEmpty(instId))
            {
                WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
                FormId = info.FormId;
                //FormId = _BPMContext.ProcInst.FormId;
                //初始化表单数据
                InitFormData(FormId);
            }
            else
            {
                ExceptionHander.GoToErrorPage();
            }

            ViewState["IsSubmit"] = false;
            //审批界面显示
            if (!string.IsNullOrEmpty(Request.QueryString["sn"]))
            {
                sn.Value = Request.QueryString["sn"];

                WorklistItem listItem = WorkflowHelper.GetWorklistItemWithSN(sn.Value, "founder\\" + _BPMContext.CurrentUser.LoginId);
                taskID.Value   = listItem.ID.ToString();
                nodeID.Value   = listItem.ActivityInstanceDestination.ActID.ToString();
                nodeName.Value = listItem.ActivityInstanceDestination.Name;
                InitApproveOpinion(nodeName.Value);
            }
            else
            {
                ExceptionHander.GoToErrorPage("该审批环节已结束", null);
            }
        }
        //显示按钮
        ShowButton();
        //设置菜单
        SetMenu();
    }
Ejemplo n.º 28
0
 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();
         }
     }
 }
Ejemplo n.º 29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ///加载页面数据
         string instId = Request.QueryString["id"];
         if (!string.IsNullOrEmpty(instId))
         {
             WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
             FormId    = info.FormId;
             FormTitle = info.FormTitle;
             InitFormData();
         }
         else
         {
             ExceptionHander.GoToErrorPage();
         }
     }
 }
Ejemplo n.º 30
0
 /// <summary>
 /// 页面加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string instId = Request.QueryString["ID"];
         if (!string.IsNullOrEmpty(instId))
         {
             WorkFlowInstance info = new WF_WorkFlowInstance().GetWorkFlowInstanceById(instId);
             ViewState["InstanceID"] = Request.QueryString["ID"];
             FormId = info.FormId;
             InitFormData();
             InitApproveOpinion();
         }
         else
         {
             ExceptionHander.GoToErrorPage();
         }
     }
 }