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; }
private void updateApprove(string if_agree, string next, BasicInfo info, bool if_back) { //更新审批流程 int recordID = Convert.ToInt32(Request["RecordID"]); PayAssign pi = PayAssign.GetPayAssignByID(recordID); pi.ApproveProcess += info.StaffName.Trim() + "-" + if_agree + ","; PayAssign.SetPayAssignOutSchool(recordID, pi); //更新下一审批人 int applyID = Convert.ToInt32(Request["ApplyID"]); string nextApprover = next; Apply.UpdateNextApprover(applyID, nextApprover, if_back); }