Пример #1
0
    /// <summary>
    /// 业务审核
    /// </summary>
    public override bool Audit(string pm_sOpinionConfirm)
    {
        base.Audit(pm_sOpinionConfirm);

        try
        {
            string ErrMsg = "";

            if (pm_sOpinionConfirm != "")
            {
                RmsPM.BFL.LocaleViseBFL ViseBFL = new RmsPM.BFL.LocaleViseBFL();
                switch (pm_sOpinionConfirm)
                {
                case "Approve":
                    ViseBFL.PassAudit(int.Parse(this.OperationCode), ViseBFL.GetLocalViseCosts(int.Parse(this.OperationCode)));
                    ViseBFL.UpdateComeToMoney(int.Parse(this.OperationCode), RmsPM.BFL.LocaleViseBFL.GetViseSumMoney(int.Parse(this.OperationCode)));
                    break;

                case "Reject":
                    ViseBFL.StartAudit(int.Parse(this.OperationCode));
                    break;

                case "Unknow":
                    ErrMsg = "请选择评审结果!";
                    break;

                default:
                    ErrMsg = "请选择评审结果!";
                    break;
                }

                if (ErrMsg != "")
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, ErrMsg));
                    return(false);
                }
            }

            return(true);
        }
        catch (Exception ex)
        {
            ApplicationLog.WriteLog(this.ToString(), ex, "");
            Response.Write(Rms.Web.JavaScript.Alert(true, "业务审核出错:" + ex.Message));
            throw ex;
        }
    }
Пример #2
0
    /// <summary>
    /// 按钮状态控制



    /// </summary>
    private void ButtonStatusCtrl()
    {
        RmsPM.BFL.LocaleViseBFL vise   = new RmsPM.BFL.LocaleViseBFL();
        Button          btnModify      = ((Button)this.FormView1.Row.FindControl("btnModify"));
        Button          btnDelete      = ((Button)this.FormView1.Row.FindControl("btnDelete"));
        HtmlInputButton btnRequisition = ((HtmlInputButton)this.FormView1.Row.FindControl("btnRequisition"));
        HtmlInputButton btnAudit       = ((HtmlInputButton)this.FormView1.Row.FindControl("btnAudit"));
        HtmlInputButton btnPrint       = ((HtmlInputButton)this.FormView1.Row.FindControl("btnPrint"));
        Button          btnBalance     = ((Button)this.FormView1.Row.FindControl("btnBalance"));

        //结算状态



        if (RmsPM.BFL.LocaleViseBFL.GetBalanceStatus((int)FormView1.DataKey.Value) == TiannuoPM.MODEL.ViseBalanceStatusEnum.isbalance)
        {
            btnModify.Visible            = false;
            btnAddDtl.Visible            = false;
            btnDelete.Visible            = false;
            btnRequisition.Visible       = false;
            btnAudit.Visible             = false;
            btnPrint.Visible             = true;
            btnBalance.Visible           = false;
            GridView1.Columns[0].Visible = false;
        }
        else
        {
            //审核状态



            switch (RmsPM.BFL.LocaleViseBFL.GetStatus((int)FormView1.DataKey.Value))
            {
            case TiannuoPM.MODEL.ViseStatusEnum.wait:
                btnModify.Visible = true;
                if (FormView1.CurrentMode == FormViewMode.ReadOnly)
                {
                    btnAddDtl.Visible = (vise.GetLocalViseCosts((int)FormView1.DataKey.Value).Count == 0);
                }
                else
                {
                    btnAddDtl.Visible = false;
                }
                btnDelete.Visible = true;

                btnRequisition.Visible = true;
                btnAudit.Visible       = true;
                btnPrint.Visible       = false;
                btnBalance.Visible     = false;
                break;

            case TiannuoPM.MODEL.ViseStatusEnum.process:
                btnModify.Visible            = false;
                btnAddDtl.Visible            = false;
                btnDelete.Visible            = false;
                btnRequisition.Visible       = false;
                btnAudit.Visible             = true;
                btnPrint.Visible             = false;
                btnBalance.Visible           = false;
                GridView1.Columns[0].Visible = false;
                break;

            case TiannuoPM.MODEL.ViseStatusEnum.ispass:
                btnModify.Visible            = false;
                btnAddDtl.Visible            = false;
                btnDelete.Visible            = false;
                btnRequisition.Visible       = false;
                btnAudit.Visible             = false;
                btnPrint.Visible             = true;
                btnBalance.Visible           = true;
                GridView1.Columns[0].Visible = false;
                break;

            case TiannuoPM.MODEL.ViseStatusEnum.nopass:
                btnModify.Visible            = false;
                btnAddDtl.Visible            = false;
                btnDelete.Visible            = false;
                btnRequisition.Visible       = false;
                btnAudit.Visible             = false;
                btnPrint.Visible             = true;
                btnBalance.Visible           = false;
                GridView1.Columns[0].Visible = false;
                break;
            }
        }
        if (!user.HasRight("220103"))
        {
            btnModify.Visible            = false;
            btnAddDtl.Visible            = false;
            GridView1.Columns[0].Visible = false;
        }
        if (!user.HasRight("220104"))
        {
            btnAudit.Visible = false;
        }
        if (!user.HasRight("220105"))
        {
            btnBalance.Visible = false;
        }
        //if (!user.HasRight("220106"))
        if (!user.HasRight("220107"))
        {
            btnDelete.Visible = false;
        }
        if (!user.HasRight("220108"))
        {
            btnRequisition.Visible = false;
        }
        //if (!user.HasRight("220109"))
        if (!user.HasRight("220110"))
        {
            btnPrint.Visible = false;
        }
    }
Пример #3
0
    /// <summary>
    /// 页面加载
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["Projectcode"] + string.Empty != string.Empty)
        {
            _projectCode = Request["Projectcode"];
        }
        if (!IsPostBack)
        {
            if (!user.HasRight("220101"))
            {
                Response.Redirect("../RejectAccess.aspx");
                Response.End();
            }

            if (Request["ViseCode"] + "" != "")
            {
                this.ViewState["ViseCode"] = Request["ViseCode"] + "";
            }
            if (this.ViewState["ViseCode"] == null)
            {
                FormView1.ChangeMode(FormViewMode.Insert);
            }

            RmsPM.BFL.LocaleViseBFL vise = new RmsPM.BFL.LocaleViseBFL();
            if (Request["Projectcode"] + string.Empty != string.Empty)
            {
                _projectCode = Request["Projectcode"];
            }
            else
            {
                int viseCode;
                if (int.TryParse(this.ViewState["ViseCode"].ToString(), out viseCode))
                {
                    _projectCode = vise.GetLocalVise(viseCode)[0].ViseProject;
                }
                else
                {
                    _projectCode = string.Empty;
                }
            }
            this.btnAddDtl.Attributes["OnClick"] = "javascript:AddDtl('');return false;";
            this.btnAddDtl.Visible = (FormView1.CurrentMode != FormViewMode.Insert && (vise.GetLocalViseCosts(int.Parse(Request["ViseCode"].ToString())).Count == 0));
            this.WorkFlowList1.ProcedureNameAndApplicationCodeList = "'签证审核" + Request["ViseCode"] + "'";
            this.WorkFlowList1.DataBound();



            //前一条流程未结束,不允许在提交发送


            if (this.FormView1.CurrentMode == FormViewMode.ReadOnly)
            {
                int iCont = RmsPM.BLL.WorkFlowRule.GetBeginCaseCountByProcedureNameAndApplicationCode("签证审核", Request["ViseCode"] + "");
                if (iCont > 0)
                {
                    HtmlInputButton btnRequisition = ((HtmlInputButton)this.FormView1.Row.FindControl("btnRequisition"));
                    btnRequisition.Visible = false;
                }
            }
            else
            {
                if ("yefengpm" == this.up_sPMNameLower)
                {
                    ((RequiredFieldValidator)this.FormView1.Row.FindControl("RequiredFieldValidator4")).Enabled = true;
                }
            }
        }
    }