Пример #1
0
    protected void btnNoPassAudit_Click(object sender, EventArgs e)
    {
        RmsPM.BFL.DesignChangeBFL dc = new RmsPM.BFL.DesignChangeBFL();
        bool   isYFintel             = false;
        string number = "";

        if (this.up_sPMNameLower == "yefengpm")
        {
            TiannuoPM.MODEL.DesignChangeModel design = dc.GetDesignChange(int.Parse(Request["DesignChangeCode"].ToString()));
            number = design.Number;
            if (design.Type == "1")
            {
                if (number.IndexOf('-') > 0)
                {
                    string[] numbers = number.Split('-');
                    if (numbers.Length == 5)
                    {
                        number    = numbers[0] + "-" + numbers[1] + "-" + numbers[3] + "(审)" + RmsPM.DAL.EntityDAO.SystemManageDAO.GetFormatSysCode("YFID" + Request["projectCode"] + numbers[1], "{####}", 1001);
                        isYFintel = true;
                    }
                }
            }
        }
        if (isYFintel)
        {
            dc.YFNoPass(int.Parse(Request["DesignChangeCode"].ToString()), number);
        }
        else
        {
            dc.NoPass(int.Parse(Request["DesignChangeCode"].ToString()));
        }
        Response.Write("<script>window.opener.location.reload();window.close();</script>");
    }
Пример #2
0
    private void ButtonStatusCtrl()
    {
        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"));

        RmsPM.BFL.DesignChangeBFL         dc      = new RmsPM.BFL.DesignChangeBFL();
        TiannuoPM.MODEL.DesignChangeModel dcmodel = dc.GetDesignChange((int)FormView1.DataKey.Value);

        //ArrayList ar = user.GetResourceRight(FormView1.DataKey.Value.ToString(), "DesignChange");
        switch (dcmodel.State)
        {
        case "0":
            btnModify.Visible      = true;
            btnDelete.Visible      = true;
            btnAudit.Visible       = true;
            btnRequisition.Visible = true;
            break;

        case "1":
            btnModify.Visible      = false;
            btnDelete.Visible      = false;
            btnAudit.Visible       = true;
            btnRequisition.Visible = false;
            break;

        case "2":
            btnModify.Visible      = false;
            btnDelete.Visible      = false;
            btnAudit.Visible       = false;
            btnRequisition.Visible = false;
            break;

        case "3":
            btnModify.Visible      = false;
            btnDelete.Visible      = false;
            btnAudit.Visible       = true;
            btnRequisition.Visible = true;
            break;
        }
        if (!user.HasRight("2402"))
        {
            btnModify.Visible = false;
        }
        if (!user.HasRight("2404"))
        {
            btnDelete.Visible = false;
        }
        if (!user.HasRight("2405"))
        {
            btnAudit.Visible = false;
        }
        if (!user.HasRight("2406"))
        {
            btnRequisition.Visible = false;
        }
        if (FormView1.CurrentMode == FormViewMode.ReadOnly)
        {
            int iCont = RmsPM.BLL.WorkFlowRule.GetBeginCaseCountByProcedureNameAndApplicationCode("设计变更", Request["DesignChangeCode"] + "");
            if (iCont > 0)
            {
                btnRequisition.Visible = false;
            }
        }
    }