示例#1
0
    private void updateApprove(string if_agree, string next, BasicInfo info, bool if_back)
    {
        int         recordID = Convert.ToInt32(Request["RecordID"]);
        RepairApply ri       = RepairApply.GetRepairApplyByID(recordID);

        ri.ApproveProcess += info.StaffName.Trim() + "-" + if_agree + ",";
        RepairApply.SetRepairApplyByID(recordID, ri);

        string nextApprover = next;
        int    applyID      = Convert.ToInt32(Request["ApplyID"]);

        Apply.UpdateNextApprover(applyID, nextApprover, if_back);
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int         recordID = Convert.ToInt32(Request["RecordID"]);
        int         applyID  = Convert.ToInt32(Request["ApplyID"]);
        bool        rejected = Convert.ToBoolean(Request["rejected"]);
        Apply       ap       = Apply.GetApplyByID(applyID);
        RepairApply ri       = RepairApply.GetRepairApplyByID(recordID);

        equipmentName.Text   = ri.EquipmentName;
        equipmentType.Text   = ri.EquipmentType;
        staffName.Text       = ri.StaffName;
        department.Text      = ri.DepartmentName;
        buyDate.Text         = ri.BuyDate.ToShortDateString();
        bugDate.Text         = ri.BugDate.ToShortDateString();
        bugDetail.Text       = ri.BugDetail;
        fixDate.Text         = ri.FixDate.ToShortDateString();
        duringGuarantee.Text = ri.DuringGuarantee ? "是" : "否";
        repairSelf.Text      = ri.RepairSelf ? "是" : "否";
        budget.Text          = ri.Budget.ToString();
        settleType.Text      = ri.SettleType;
        sentToRepair.Text    = ri.SentToRepair.ToShortDateString();
        processShow.Text     = ri.ApproveProcess;

        //用户权限相关显示功能
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!rejected && ap.NextApprover == ri.StaffName)
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            whyDisagree.Visible    = false;
            //可打印状态
            proManager.Text = "已签字";
            depManager.Text = "已签字";
            guanwei.Text    = "已签字";
        }
        else if (info.StaffName.Trim() == ri.StaffName.Trim() || info.Position.Trim() == "出纳")
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            if (info.Position.Trim() != "出纳")
            {
                whyDisagree.Visible = false;
            }
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }