Пример #1
0
    /// <summary>
    /// 若账号调整,需要再经过财务主管审核
    /// </summary>
    /// <returns></returns>
    private string judgeAdjust(string position, string department)
    {
        int         recordID        = Convert.ToInt32(Request["RecordID"]);
        SettleApply si              = SettleApply.GetSettleApplyByID(recordID);
        string      originalAccount = SettleApply.GetSettleApplyByID(recordID).ProjectAccount;

        if (originalAccount == accountList.SelectedValue)
        {
            if (position == "会计" || si.ApproveProcess.Contains("财务主管"))
            {
                return("出纳");
            }
            else
            {
                return(Department.GetDepartmentByName(department).BULeader);
            }
        }
        else
        {
            if (position == "会计")
            {
                return("财务主管");
            }
            else
            {
                return("出纳");
            }
        }
    }
Пример #2
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"]);
        SettleApply si       = SettleApply.GetSettleApplyByID(recordID);

        si.ApproveProcess += info.StaffName.Trim() + "-" + if_agree + ",";
        si.ProjectAccount  = accountList.SelectedValue;
        SettleApply.SetSettleApplyByID(recordID, si, usr.UserID);

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

        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);
        SettleApply si       = SettleApply.GetSettleApplyByID(recordID);

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

            staffName.Text            = si.StaffName;
            department.Text           = si.Department_str;
            position.Text             = si.Position;
            settleDate.Text           = si.SettleDate.ToShortDateString();
            accountList.SelectedValue = si.ProjectAccount;
            money.Text                = si.Money.ToString();
            reason.Text               = si.Reason;
            legal.SelectedIndex       = si.Leagal == true ? 0 : 1;
            innerBudget.SelectedIndex = si.InnerBudget == true ? 0 : 1;
            checkBill.Text            = si.CheckBill;
            processShow.Text          = si.ApproveProcess;
        }

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

        if (!rejected && ap.NextApprover == si.StaffName)
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            cashierButton.Visible  = false;
            rejectButton.Visible   = false;
            whyDisagree.Visible    = false;
            accountList.Enabled    = false;
            //可打印状态
            depManager.Text = "已签字";
            guanwei.Text    = "已签字";
            company.Text    = "已签字";
        }
        else if (info.StaffName.Trim() == si.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;
    }