Esempio n. 1
0
    private void updateApprove(string if_agree, string next, BasicInfo info, bool if_back)
    {
        Users  usr      = (Users)Session["Identify"];
        int    recordID = Convert.ToInt32(Request["RecordID"]);
        CarUse ci       = CarUse.GetCarUseByID(recordID);

        ci.ApproveProcess += info.StaffName.Trim() + "-" + if_agree + ",";
        CarUse.SetCarUseByID(recordID, ci);

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

        Apply.UpdateNextApprover(applyID, nextApprover, if_back);
    }
Esempio n. 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);
        CarUse ci       = CarUse.GetCarUseByID(recordID);

        staffName.Text   = ci.StaffName;
        department.Text  = ci.DepartmentName;
        destination.Text = ci.Destination;
        timeInUse.Text   = ci.StartDate.ToShortDateString() + "至" + ci.EndDate.ToShortDateString();
        alongCount.Text  = ci.AlongCount.ToString();
        alongName.Text   = ci.AlongName;
        reason.Text      = ci.Reason;
        driver.Text      = ci.Driver;
        carNum.Text      = ci.CarNum;
        note.Text        = ci.Note;
        processShow.Text = ci.ApproveProcess;

        recordList.Text = transResult(ci.DriveHistoryList);


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

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