protected void LoadUpdates() { string strWrite = ""; string strStatus = ""; string strLink = ""; string strPreview = ""; string strJournalStatus = ""; string strEmployeeStatDate = ""; string strDepHeadStatus = ""; string strDivHeadStatus = ""; foreach (DataRow drJournal in EmployeeJournal.GetDSG(Convert.ToInt16(ddlJournalYear.SelectedValue), ddlJournalDates.SelectedValue.ToString(), ddlDepartment.SelectedValue.ToString()).Rows) { if (drJournal["JournalStatus"].ToString() == "S" && drJournal["LockStatus"].ToString() == "0") { strJournalStatus = "Draft"; strEmployeeStatDate = "(Last Log on " + drJournal["ModifiedOn"].ToString() + ")"; strDepHeadStatus = ""; strDivHeadStatus = ""; } else if (drJournal["JournalStatus"].ToString() == "F") { strJournalStatus = "For Approval"; strEmployeeStatDate = "(Submitted on " + drJournal["ModifiedOn"].ToString() + ")"; if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(drJournal["JournalCode"]), "1") == "A") { strDepHeadStatus = "(" + EmployeeJournalApproval.GetApproverADate(Convert.ToInt16(drJournal["JournalCode"]), "1") + ")"; } else { strDepHeadStatus = "(Not Yet Approved)"; } if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(drJournal["JournalCode"]), "2") == "A") { strDivHeadStatus = "(" + EmployeeJournalApproval.GetApproverADate(Convert.ToInt16(drJournal["JournalCode"]), "2") + ")"; } else { strDivHeadStatus = "(Not Yet Approved)"; } } else if (drJournal["JournalStatus"].ToString() == "A") { strJournalStatus = "Approved"; strEmployeeStatDate = "(Submitted on " + drJournal["ModifiedOn"].ToString() + ")"; strDepHeadStatus = ""; strDivHeadStatus = ""; } strLink = "JournalViewer"; strWrite = strWrite + "<tr>" + "<td class='GridRows'>" + clsEmployee.GetName(drJournal["CreatedBy"].ToString()) + "<br />" + strEmployeeStatDate + "</td>" + "<td class='GridRows'>" + strJournalStatus + "</td>" + "<td class='GridRows'>" + EmployeeJournalApproval.GetApprover(Convert.ToInt16(drJournal["JournalCode"]), "1") + "<br />" + strDepHeadStatus + "</td>" + //"<td class='GridRows'>" + EmployeeJournalApproval.GetApprover(Convert.ToInt16(drJournal["JournalCode"]), "2") + "<br />" + strDivHeadStatus + "</td>" + "</tr>"; } //Response.Write(strWrite); lblWrite.Text = strWrite; }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); if (!Page.IsPostBack) { string strDeptDetails = "", strDivDetails = ""; string strDeptStatus = "", strDivStatus = ""; lblWeekDates.Text = WeekYear.GetWeekName(Convert.ToInt16(EmployeeJournal.GetWeekCode(Convert.ToInt16(Request.QueryString["JournalCode"])))).ToString() + " (" + WeekYear.GetDateStart(Convert.ToInt16(EmployeeJournal.GetWeekCode(Convert.ToInt16(Request.QueryString["JournalCode"])))).ToString("MMM dd, yyyy") + " - " + WeekYear.GetDateEnd(Convert.ToInt16(EmployeeJournal.GetWeekCode(Convert.ToInt16(Request.QueryString["JournalCode"])))).ToString("MMM dd, yyyy") + ")"; this.MakeCart(); this.LoadContent(); //lblDeptApprover.Text = "(" + EmployeeJournalApproval.GetApprover(Convert.ToInt16(Request.QueryString["JournalCode"]), "1") + ")"; try { lblDepartmentHeadsRemarks.Text = EmployeeJournalApproval.GetRemarks(Convert.ToInt16(Request.QueryString["JournalCode"]), "1"); if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(Request.QueryString["JournalCode"]), "1") == "F") { strDeptStatus = "For Review"; } else if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(Request.QueryString["JournalCode"]), "1") == "A") { strDeptStatus = "Reviewed"; } else if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(Request.QueryString["JournalCode"]), "1") == "F") { strDeptStatus = "Disapproved"; } strDeptDetails = "Reviewer: " + EmployeeJournalApproval.GetApprover(Convert.ToInt16(Request.QueryString["JournalCode"]), "1") + "<br />" + "Status: " + strDeptStatus + "<br />" + "Remarks: <br />" + EmployeeJournalApproval.GetRemarks(Convert.ToInt16(Request.QueryString["JournalCode"]), "1"); lblDepartmentHeadsRemarks.Text = strDeptDetails; } catch { } //if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(Request.QueryString["JournalCode"]), "2") == "F") //{ // strDivStatus = "For Approval"; //} //else if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(Request.QueryString["JournalCode"]), "2") == "A") //{ // strDivStatus = "Approved"; //} //else if (EmployeeJournalApproval.GetApproverAStatus(Convert.ToInt16(Request.QueryString["JournalCode"]), "2") == "F") //{ // strDivStatus = "Disapproved"; //} //strDivDetails = "Approver: " + EmployeeJournalApproval.GetApprover(Convert.ToInt16(Request.QueryString["JournalCode"]), "2") + "<br />" + // "Status: " + strDivStatus + "<br />" + // "Remarks: <br />" + EmployeeJournalApproval.GetRemarks(Convert.ToInt16(Request.QueryString["JournalCode"]), "2"); //lblDivisionHeadsRemarks.Text = strDivDetails; } }