Beispiel #1
0
    protected void cashierButton_Click(object sender, EventArgs e)
    {
        CashFlowInfo tran     = new CashFlowInfo();
        int          recordID = Convert.ToInt32(Request["RecordID"]);

        tran.RecordID       = recordID;
        tran.HappenDate     = Convert.ToDateTime(happenDate.Text);
        tran.ProjectCode    = projectCode.Text;
        tran.ProjectAccount = accountList.SelectedValue;
        tran.CashType       = "费用报销";
        tran.Income         = 0;
        tran.Expense        = Convert.ToDouble(allExpense.Text);
        tran.Department     = department.Text;
        tran.Summary        = "";
        tran.Remark         = remark.Text;
        tran.Handler        = staffName.Text;

        Session["CashierDetail"] = tran;

        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        updateApprove("同意", getNextApprover(info), info, false);

        Response.Redirect("~/Finance/CashCheckin.aspx");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!PageAuthorityManage.hasAuthority(info, "固定资产申购"))
        {
            Response.Write("<script Language='JavaScript'>alert('抱歉!您没有此操作的权限');window.location.href ='../Account/ApplyListPage.aspx'</script>");
        }

        ScriptManager1.RegisterAsyncPostBackControl(addRow);
        if (ViewState["count"] != null)
        {
            for (int i = 0; i < Convert.ToInt16(ViewState["count"]); i++)
            {
                addNewRow();
            }
        }
        if (!IsPostBack)
        {
            DataSet allPro = ProjectInfo.GetAllProjects();
            projectCodeList.DataSource     = allPro.Tables[0].DefaultView;
            projectCodeList.DataTextField  = "ProjectName";
            projectCodeList.DataValueField = "ProjectCode";
            projectCodeList.DataBind();

            staffName.Text  = info.StaffName;
            department.Text = info.Department;
            applyDate.Text  = DateTime.Today.ToShortDateString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!PageAuthorityManage.hasAuthority(info, "出差报销"))
        {
            Response.Write("<script Language='JavaScript'>alert('抱歉!您没有此操作的权限');window.location.href ='../Account/ApplyListPage.aspx'</script>");
        }

        ScriptManager1.RegisterAsyncPostBackControl(projectNameList);
        if (!IsPostBack)
        {//首次加载才需要绑定
            DataSet allPro = ProjectInfo.GetAllProjects();
            projectNameList.DataSource     = allPro.Tables[0].DefaultView;
            projectNameList.DataTextField  = "ProjectName";
            projectNameList.DataValueField = "ProjectName";
            projectNameList.DataBind();
            accountList.DataSource     = allPro.Tables[0].DefaultView;
            accountList.DataTextField  = "ProjectAccount";
            accountList.DataValueField = "ProjectAccount";
            accountList.DataBind();

            accountList.SelectedValue = ProjectInfo.GetProjectInfoByName(projectNameList.SelectedValue).ProjectAccount;

            staffName.Text  = info.StaffName;
            department.Text = info.Department;
            applyDate.Text  = DateTime.Today.ToShortDateString();
        }



        //
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users usr = (Users)Session["Identify"];

        BasicInfo bi = BasicInfo.GetBasicInfoByID(usr.UserID);

        staffName.Text  = bi.StaffName;
        oldName.Text    = bi.OldName;
        gender.Text     = bi.Gender ? "男" : "女";
        race.Text       = bi.Race;
        department.Text = bi.Department;
        company.Text    = bi.Company;
        position.Text   = bi.Position;
        title.Text      = bi.Title;
        native.Text     = bi.Native;
        birth.Text      = bi.Birthday.ToShortDateString();
        political.Text  = bi.Politics;
        education.Text  = bi.Education;
        address.Text    = bi.Address;
        //household.Text = bi.HouseHold;
        fileAddr.Text     = bi.FileAddr;
        contact.Text      = bi.Contact;
        mail.Text         = bi.Email;
        marriage.Text     = bi.Marriage;
        identifyID.Text   = bi.CardID;
        school.Text       = bi.School;
        major.Text        = bi.Major;
        foreignLan.Text   = bi.ForeignLan;
        foreignLev.Text   = bi.ForeignLev;
        urgenContact.Text = bi.UrgentContact;
        urgenPerson.Text  = bi.UrgentPerson;
    }
Beispiel #5
0
    /// <summary>
    /// 获取申请后第一个审批人,注意处理本人是部门经理或财务主管的情况
    /// </summary>
    /// <param name="userID"></param>
    /// <param name="department"></param>
    /// <returns></returns>
    private static string getNextApprover(int userID, string department)
    {
        Department dp     = Department.GetDepartmentByName(department);
        string     origin = dp.ResponsiblePerson;
        BasicInfo  bi     = BasicInfo.GetBasicInfoByID(userID);
        string     result = "";

        if (bi.StaffName != origin)
        {
            result = origin;
        }
        else
        {
            if (bi.Position.Trim() == "财务主管")
            {
                result = dp.BULeader;
            }
            else
            {
                result = "财务主管";
            }
        }

        return(result);
    }
Beispiel #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        staffName.Text = info.StaffName;
    }
Beispiel #7
0
    protected void agreeButton_Click(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        updateApprove("同意", getNextApprover(info), info, false);
    }
Beispiel #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!PageAuthorityManage.hasAuthority(info, "组织管理"))
        {
            Response.Write("<script Language='JavaScript'>alert('抱歉!您没有此操作的权限');window.location.href ='../Account/ApplyListPage.aspx'</script>");
        }
        if (IsPostBack)
        {
            if (BusinessUnit.hasBUInfo(Request["BUName"].Trim()))
            {
                string name = Request["BUName"];
                string boss = Request["boss"];
                string code = Request["BUCode"];
                Session["tempName"] = name;
                Session["tempBoss"] = boss;
                Session["tempCode"] = code;

                Response.Write("<Script Language='JavaScript'>if ( window.confirm('事业部已存在,确认更新?')) {window.location.href='BusinessUnitUpdate.aspx' } else {window.location.href='#' };</script>");
            }
            else
            {
                BusinessUnit.SetBU(Request["BUName"].Trim(), Request["boss"], Request["BUCode"]);
                Response.Redirect("~/Account/BasicInfo.aspx");
            }
        }
    }
Beispiel #9
0
    protected void disagreeButton_Click(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        updateApprove("不同意", staffName.Text, info, true);
    }
Beispiel #10
0
    private string getPersonalPerformance(int year, int month)
    {
        Users       usr  = (Users)Session["Identify"];
        BasicInfo   info = BasicInfo.GetBasicInfoByID(usr.UserID);
        Performance pi   = Performance.GetPersonalCheckInByMonth(year, month, info.StaffName);

        StringBuilder buff = new StringBuilder();

        buff.Append("<tr>");
        buff.Append("<td>第一周</td>");
        buff.Append("<td>第二周</td>");
        buff.Append("<td>第三周</td>");
        buff.Append("<td>第四周</td>");
        buff.Append("<td>周平均分</td>");
        buff.Append("</tr>");

        buff.Append("<tr>");
        double temp = (pi.Week1 + pi.Week2 + pi.Week3 + pi.Week4) / 4;

        buff.Append(string.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td>", pi.Week1, pi.Week2, pi.Week3, pi.Week4, temp));

        buff.Append("</tr>");

        return(buff.ToString());
    }
Beispiel #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!PageAuthorityManage.hasAuthority(info, "用户管理"))
        {
            Response.Write("<script Language='JavaScript'>alert('抱歉!您没有此操作的权限');window.location.href ='../Account/ApplyListPage.aspx'</script>");
        }
        if (!IsPostBack)
        {
            DataSet allDep = Department.GetAllDepartment();
            depList.DataSource    = allDep.Tables[0].DefaultView;
            depList.DataTextField = "DepartmentName";
            //depList.DataValueField = "DepartmentID";
            depList.DataValueField = "DepartmentName";
            depList.DataBind();

            DataSet allPos = Roles.GetAllRoles();
            posList.DataSource    = allPos.Tables[0].DefaultView;
            posList.DataTextField = "RoleName";
            //posList.DataValueField = "RoleID";
            posList.DataValueField = "RoleName";
            posList.DataBind();
        }
    }
Beispiel #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!PageAuthorityManage.hasAuthority(info, "角色管理"))
        {
            Response.Write("<script Language='JavaScript'>alert('抱歉!您没有此操作的权限');window.location.href ='../Account/ApplyListPage.aspx'</script>");
        }
        if (IsPostBack)
        {
            if (Roles.hasRoles(Request["PositionName"]))
            {
                string name  = Request["PositionName"];
                string limit = Request["limit"];
                Session["tempName"]  = name;
                Session["tempLimit"] = limit;


                Response.Write("<Script Language='JavaScript'>if ( window.confirm('职位已存在,确认更新?')) {window.location.href='PositionUpdate.aspx' } else {window.location.href='#' };</script>");
            }
            else
            {
                Roles.SetRole(Request["PositionName"], Convert.ToInt32(Request["limit"]));
                Response.Redirect("~/Account/BasicInfo.aspx");
            }
        }
    }
Beispiel #13
0
    protected void agreeButton_Click(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        updateApprove("同意", getNextApprover(info), info, false);
        Response.Redirect("~/Account/ApplyListPage.aspx");
    }
Beispiel #14
0
    protected void disagreeButton_Click(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        updateApprove("不同意," + whyDisagree.Text, staffName.Text, info, true);
        Response.Redirect("~/Account/ApplyListPage.aspx");
    }
Beispiel #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int       UserID = Convert.ToInt32(Request["UserID"] == null ? "-1" : Request["UserID"]);
        BasicInfo bi     = BasicInfo.GetBasicInfoByID(UserID);

        bi.OnJob = false;
        BasicInfo.SetBasicInfoByID(UserID, bi);
        Response.Write("<script Language='JavaScript'>alert('员工已注销!');window.location.href ='../Admin/UserFilter.aspx'</script>");
    }
Beispiel #16
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);
        SalaryApply si       = SalaryApply.GetSalaryApplyByID(recordID);

        if (!IsPostBack)
        {
            salaryList.Text = transResult(si.StaffSalaryList, ref allCash);
        }

        //用户权限相关显示功能
        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;
            //可打印状态
            proManager.Text = "已签字";
            depManager.Text = "已签字";
            financial.Text  = "已签字";
            company.Text    = "已签字";
        }
        else if (info.StaffName.Trim() == si.StaffName.Trim() || info.Position.Trim() == "出纳")
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;

            if (info.Position.Trim() != "出纳")
            {
                cashierButton.Visible = false;
                rejectButton.Visible  = false;
                whyDisagree.Visible   = false;
            }
        }
        else if (info.Position.Trim() == "会计")
        {
            cashierButton.Visible = false;
            rejectButton.Visible  = false;
        }
        else
        {
            cashierButton.Visible = false;
            rejectButton.Visible  = false;
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }
    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);
        PositionTarget pi       = PositionTarget.GetTargetByID(recordID);

        staffName.Text      = pi.StaffName;
        position.Text       = pi.Position;
        department.Text     = pi.Department;
        formerPosition.Text = pi.FormerPosition;
        leader.Text         = pi.Leader;
        year.Text           = string.Format("{0}.1.1~{1}.12.31", pi.Year, pi.Year);
        newPosition.Text    = pi.NewPosition;
        duty.Text           = pi.Duty.Replace("\n", "<br>").Replace(" ", "& nbsp;");
        target.Text         = pi.Target.Replace("\n", "<br>").Replace(" ", "& nbsp;");;
        salaryLevel.Text    = pi.SalaryLevel;
        processShow.Text    = pi.ApproveProcess;

        string[] words = pi.MonthlyIncome.Split(',');
        january.Text   = words[0];
        february.Text  = words[1];
        march.Text     = words[2];
        april.Text     = words[3];
        may.Text       = words[4];
        june.Text      = words[5];
        july.Text      = words[6];
        august.Text    = words[7];
        september.Text = words[8];
        october.Text   = words[9];
        november.Text  = words[10];
        december.Text  = words[11];

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

        if (!rejected && ap.NextApprover == pi.StaffName)
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            whyDisagree.Visible    = false;
            //可打印状态
        }
        else if (info.StaffName.Trim() == pi.StaffName.Trim())
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            whyDisagree.Visible    = false;
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }
Beispiel #18
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);
        PayAssign pi       = PayAssign.GetPayAssignByID(recordID);

        school.Text             = pi.School;
        staffName.Text          = pi.StaffName;
        projectName.Text        = pi.ProjectName;
        payee.Text              = pi.Payee;
        payed.Text              = pi.Payed.ToString();
        income.Text             = pi.Income.ToString();
        assigned.Text           = pi.Assigned.ToString();
        instrument.Text         = pi.Instrument;
        hardware.Text           = pi.Hardware;
        fundingID.Text          = pi.FundingID;
        toUniversity.Text       = pi.ToUniversity.ToString();
        toUniversityDetail.Text = pi.ToUniversityDetail;
        toSchool.Text           = pi.ToSchool.ToString();
        toSchoolDetail.Text     = pi.ToSchoolDetail;
        fundings.Text           = pi.Fundings.ToString();
        fundingsDetail.Text     = pi.FundingsDetail;
        welfare.Text            = pi.Welfare.ToString();
        welfareDetail.Text      = pi.WelfareDetail;
        note.Text        = pi.Note;
        processShow.Text = pi.ApproveProcess;



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

        if (!rejected && ap.NextApprover == pi.StaffName)
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            whyDisagree.Visible    = false;
            //可打印状态
        }
        else if (info.StaffName.Trim() == pi.StaffName.Trim() || info.Position.Trim() == "出纳")
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            if (info.Position.Trim() != "出纳")
            {
                whyDisagree.Visible = false;
            }
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }
Beispiel #19
0
    protected void rejectButton_Click(object sender, EventArgs e)
    {
        int         recordID = Convert.ToInt32(Request["RecordID"]);
        SalaryApply si       = SalaryApply.GetSalaryApplyByID(recordID);

        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        updateApprove("不同意," + whyDisagree.Text, si.StaffName, info, true);
        Response.Redirect("~/Account/ApplyListPage.aspx");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!IsPostBack)
        {
            staffName.Text  = info.StaffName;
            department.Text = info.Department;
            position.Text   = info.Position;
        }
    }
    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);
        ContractApply ci       = ContractApply.GetContractApplyByID(recordID);

        staffName.Text           = ci.StaffName;
        department.Text          = ci.Department_str;
        contractName.Text        = ci.ContractName;
        projectName.Text         = ci.ProjectName;
        projectCode.Text         = ci.ProjectCode;
        money.Text               = ci.Money.ToString();
        partyBAddress.Text       = ci.PartyBAddress;
        partyBContact.Text       = ci.PartyBContact;
        partyBName.Text          = ci.PartyBName;
        partyBTelephone.Text     = ci.PartyBTelephone;
        businessLicense.Checked  = ci.BusinessLicense;
        industoryLicense.Checked = ci.IndustoryLicense;
        processShow.Text         = ci.ApproveProcess;

        if (ci.Others != "")
        {
            others.Checked = true; otherInfo.Text = ci.Others;
        }



        //用户权限相关显示功能
        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;
        }
        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;
    }
    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);
        OfficeSupplyApply oi       = OfficeSupplyApply.GetOfficeSupplyApplyByID(recordID);

        staffName.Text  = oi.StaffName;
        department.Text = oi.Department;
        reason.Text     = oi.Reason;
        applyDate.Text  = oi.ApplyDate.ToShortDateString();



        processShow.Text = oi.ApproveProcess;

        double money = 0.0;

        supplyList.Text        = transResult(oi.OfficeList, ref money);
        allExpensive.Text      = money.ToString();
        allExpensiveUpper.Text = MoneyConvert.convertToCapital(money.ToString());

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

        if (!rejected && ap.NextApprover == oi.StaffName)
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            whyDisagree.Visible    = false;
            //可打印状态
            proManager.Text = "已签字";
            depManager.Text = "已签字";
            counter.Text    = "已签字";
            cashier.Text    = "已签字";
            company.Text    = "已签字";
        }
        else if (info.StaffName.Trim() == oi.StaffName.Trim())
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            if (info.Position.Trim() != "出纳")
            {
                whyDisagree.Visible = false;
            }
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }
Beispiel #23
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);
        EntertainApply ei       = EntertainApply.GetEntertainApplyByID(recordID);

        if (!IsPostBack)
        {
            staffName.Text     = ei.StaffName;
            department.Text    = ei.Department;
            manager.Text       = ei.Manager;
            applyDate.Text     = ei.ApplyDate.ToShortDateString();
            treatDate.Text     = ei.TreatDate.ToShortDateString();
            treated.Text       = ei.Treated;
            treatStandard.Text = ei.TreatStandard;
            treatStyle.Text    = ei.TreatStyle;
            reason.Text        = ei.Reason;
            budget.Text        = ei.Budget.ToString();

            processShow.Text = ei.ApproveProcess;
        }

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

        if (!rejected && ap.NextApprover == ei.StaffName)
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            whyDisagree.Visible    = false;
            //可打印状态
            financial.Text = "已签字";
            company.Text   = "已签字";
        }
        else if (info.StaffName.Trim() == ei.StaffName.Trim() || info.Position.Trim() == "出纳")
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;

            if (info.Position.Trim() != "出纳")
            {
                whyDisagree.Visible = false;
            }
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }
Beispiel #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr = (Users)Session["Identify"];
        BasicInfo bi  = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (null != bi)
        {
            name.Text       = bi.StaffName;
            company.Text    = bi.Company;
            department.Text = bi.Department;
            position.Text   = bi.Position;
        }
        date.Text = DateTime.Today.ToShortDateString();
    }
Beispiel #25
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;
    }
Beispiel #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!PageAuthorityManage.hasAuthority(info, "收支一览"))
        {
            Response.Write("<script Language='JavaScript'>alert('抱歉!您没有此操作的权限');window.location.href ='../Account/ApplyListPage.aspx'</script>");
        }

        if (!IsPostBack)
        {
            loadTypeList();
        }
    }
Beispiel #27
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;
    }
Beispiel #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Users     usr  = (Users)Session["Identify"];
        BasicInfo info = BasicInfo.GetBasicInfoByID(usr.UserID);

        if (!PageAuthorityManage.hasAuthority(info, "员工用餐申请"))
        {
            Response.Write("<script Language='JavaScript'>alert('抱歉!您没有此操作的权限');window.location.href ='../Account/ApplyListPage.aspx'</script>");
        }

        if (!IsPostBack)
        {
            staffName.Text  = info.StaffName;
            department.Text = info.Department;
            position.Text   = info.Position;
        }
    }
Beispiel #29
0
    protected void confirm_Click(object sender, EventArgs e)
    {
        Users        usr  = (Users)Session["Identify"];
        BasicInfo    info = BasicInfo.GetBasicInfoByID(usr.UserID);
        YearlyBudget yi   = new YearlyBudget();

        yi.StaffName      = info.StaffName;
        yi.ApplyDate      = DateTime.Today;
        yi.ApproveProcess = "";

        int recordid = YearlyBudget.SetYearlyBudgetByID(-1, yi, info.StaffName);
        List <YearlyBudgetSingle> budgetList = getBudgetList();

        YearlyBudgetSingle.SetOfficeSupplySingle(budgetList, recordid);

        Response.Redirect("~/Account/ApplyListPage.aspx");
    }
    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);
        StaffMealApply si       = StaffMealApply.GetStaffMealApplyByID(recordID);

        staffName.Text      = si.StaffName;
        department.Text     = si.DepartmentName;
        position.Text       = si.Position;
        mealDate.Text       = si.MealDate.ToShortDateString();
        reason.Text         = si.Reason;
        persons.Text        = si.Persons.ToString();
        money.Text          = si.Money.ToString();
        legal.SelectedIndex = si.Legal == true ? 0 : 1;
        style.SelectedIndex = si.Style == true ? 0 : 1;
        standard.Text       = si.Standard;
        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;
            whyDisagree.Visible    = false;
            //可打印状态
            depManager.Text = "已签字";
            company.Text    = "已签字";
        }
        else if (info.StaffName.Trim() == si.StaffName.Trim() || info.Position.Trim() == "出纳")
        {
            agreeButton.Visible    = false;
            disagreeButton.Visible = false;
            if (info.Position.Trim() != "出纳")
            {
                whyDisagree.Visible = false;
            }
        }
        //测试阶段保持处理流程可见,运行阶段记得去掉
        processShow.Visible = true;
    }