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

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

        string nextApprover = next;

        Apply.UpdateNextApprover(recordID, nextApprover, if_back);
    }
示例#2
0
    private void updateApprove(string if_agree, string next, BasicInfo info, bool if_back)
    {
        //更新审批流程
        int           recordID = Convert.ToInt32(Request["RecordID"]);
        Reimbursement ri       = Reimbursement.GetReimbursementByID(recordID);

        ri.ApproveProcess += info.StaffName.Trim() + "-" + if_agree + ",";
        ri.ProjectAccount  = accountList.SelectedValue;
        Reimbursement.SetReimbursement(recordID, ri);
        //更新下一审批人
        int    applyID      = Convert.ToInt32(Request["ApplyID"]);
        string nextApprover = next;

        Apply.UpdateNextApprover(applyID, nextApprover, if_back);
    }
示例#3
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);
        Reimbursement ri       = Reimbursement.GetReimbursementByID(recordID);

        if (!IsPostBack)
        {
            DataSet allPro = ProjectInfo.GetAllProjects();
            accountList.DataSource     = allPro.Tables[0].DefaultView;
            accountList.DataTextField  = "ProjectAccount";
            accountList.DataValueField = "ProjectAccount";
            accountList.DataBind();



            staffName.Text            = ri.StaffName;
            department.Text           = ri.Department;
            manager.Text              = ri.Manager;
            payee.Text                = ri.Payee;
            projectCode.Text          = ri.ProjectCode;
            accountList.SelectedValue = ri.ProjectAccount;
            happenDate.Text           = ri.HappenDate.ToShortDateString();
            reimburseDate.Text        = ri.ReimburestDate.ToShortDateString();
            payeeDate.Text            = ri.PayeeDate.ToShortDateString();
            bill.Text        = ri.Bill.ToString();
            allExpense.Text  = ri.AllExpense.ToString();
            expense.Text     = ri.Expense.ToString();
            capital.Text     = MoneyConvert.convertToCapital(ri.AllExpense.ToString());
            remark.Text      = ri.Remark;
            note.Text        = ri.Note;
            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;
            cashierButton.Visible  = false;
            rejectButton.Visible   = false;
            whyDisagree.Visible    = false;
            accountList.Enabled    = false;
            //可打印状态
            proManager.Text = "已签字";
            depManager.Text = "已签字";
            financial.Text  = "已签字";
            company.Text    = "已签字";
        }
        else if (info.StaffName.Trim() == ri.StaffName.Trim() || info.Position.Trim() == "出纳")
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            accountList.Enabled    = false;
            if (info.Position.Trim() != "出纳")
            {
                cashierButton.Visible = false;
                rejectButton.Visible  = false;
                whyDisagree.Visible   = false;
            }
        }
        else if (info.Position.Trim() == "会计")
        {
            accountList.Enabled   = true;
            cashierButton.Visible = false;
            rejectButton.Visible  = false;
        }
        else
        {
            accountList.Enabled   = false;
            cashierButton.Visible = false;
            rejectButton.Visible  = false;
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }