protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] != null && Session["emp"] != null) { Employee emp = (Employee)Session["emp"]; id = Convert.ToInt32(Request.QueryString["id"]); ReqisitionListItem r = RequisitionControl.getRequisitionForApprove(id); lblReqname.Text = r.EmployeeName; lblReqDate.Text = r.Date; lblStatus.Text = r.Status; if (lblStatus.Text.Equals("Approved") || lblStatus.Text.Equals("approved") || lblStatus.Text.Equals("InProgress")) { lblStatus.ForeColor = System.Drawing.Color.Green; } else if (lblStatus.Text.Equals("Pending")) { lblStatus.ForeColor = System.Drawing.Color.Blue; } else if (lblStatus.Text.Equals("Priority")) { lblStatus.ForeColor = System.Drawing.Color.Red; } else { lblStatus.ForeColor = System.Drawing.Color.Black; } if (r.Status.ToString() != "Pending" || EmployeeController.isDeptHaveTempHead(emp.DeptCode)) { ReasonLabel.Visible = false; txtReason.Visible = false; btnApprove.Visible = false; btnReject.Visible = false; } } else { Utility.logout(); } if (!IsPostBack) { showAllItems(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["RequisitionNo"] != null) { id = Convert.ToInt32(Session["RequisitionNo"]); ReqisitionListItem r = RequisitionControl.getRequisitionForApprove(id); lblRequestedBy.Text = r.EmployeeName; lblDate.Text = r.Date; lblStatus.Text = r.Status; } else { Utility.logout(); } if (!IsPostBack) { showAllItems(); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] != null) { id = Convert.ToInt32(Request.QueryString["id"]); ReqisitionListItem r = RequisitionControl.getRequisitionForApprove(id); lblRequestBy.Text = r.EmployeeName; lblDate.Text = r.Date; lblStatus.Text = r.Status; if (lblStatus.Text.Equals("Approved") || lblStatus.Text.Equals("approved") || lblStatus.Text.Equals("InProgress")) { lblStatus.ForeColor = System.Drawing.Color.Green; } else if (lblStatus.Text.Equals("Pending")) { lblStatus.ForeColor = System.Drawing.Color.Blue; } else if (lblStatus.Text.Equals("Priority")) { lblStatus.ForeColor = System.Drawing.Color.Red; } else { lblStatus.ForeColor = System.Drawing.Color.Black; } } else { Utility.logout(); } if (!IsPostBack) { showAllItems(); } }