protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { txtDepartmentHeadsRemarks.Visible = true; txtDivisionHeadsRemarks.Visible = true; txtDepartmentHeadsRemarks.Enabled = false; txtDivisionHeadsRemarks.Enabled = false; txtDepartmentHeadsRemarks.Text = EmployeeJournalApproval.GetRemarks(Convert.ToInt16(Request.QueryString["JournalCode"]), "1"); txtDivisionHeadsRemarks.Text = EmployeeJournalApproval.GetRemarks(Convert.ToInt16(Request.QueryString["JournalCode"]), "2"); 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(); if (EmployeeJournalApproval.GetApprover(Convert.ToInt16(Request.QueryString["JournalCode"]), "1").ToString() == Request.Cookies["Speedo"]["UserName"].ToString()) { txtDepartmentHeadsRemarks.Enabled = true; btnApprove.Text = "Approved"; } if (EmployeeJournalApproval.GetApprover(Convert.ToInt16(Request.QueryString["JournalCode"]), "2").ToString() == Request.Cookies["Speedo"]["UserName"].ToString()) { txtDivisionHeadsRemarks.Enabled = true; btnApprove.Text = "Read and Commented"; } } }
protected void Page_Load(object sender, EventArgs e) { 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(); lblDeptApprover.Text = "(" + EmployeeJournalApproval.GetApprover(Convert.ToInt16(Request.QueryString["JournalCode"]), "1") + ")"; lblDepartmentHeadsRemarks.Text = EmployeeJournalApproval.GetRemarks(Convert.ToInt16(Request.QueryString["JournalCode"]), "1"); lblDivApprover.Text = "(" + EmployeeJournalApproval.GetApprover(Convert.ToInt16(Request.QueryString["JournalCode"]), "2") + ")"; lblDivisionHeadsRemarks.Text = EmployeeJournalApproval.GetRemarks(Convert.ToInt16(Request.QueryString["JournalCode"]), "2"); }
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; } }
public void LoadDueValidation() { //Response.Write(WeekYear.GetDateDue(EmployeeJournal.GetWeekCode(Convert.ToInt16(Request.QueryString["JournalCode"]))).AddHours(9).ToString()); //Response.Write("<br> " + DateTime.Now.ToString()); //Response.Write(Convert.ToDateTime("11/12/2015 4:50:17 PM").ToString()); if (WeekYear.GetDateDue(EmployeeJournal.GetWeekCode(Convert.ToInt16(Request.QueryString["JournalCode"]))).AddHours(9) < DateTime.Now) //if (Convert.ToDateTime("11/12/2015 4:57:00 PM") < DateTime.Now) { if (JournalExceptions.CountIfExist(EmployeeJournal.GetWeekCode(Convert.ToInt16(Request.QueryString["JournalCode"])), Request.Cookies["Speedo"]["UserName"].ToString()) > 0) { btnDraft.Enabled = true; btnFinalize.Enabled = true; btnPreview.Enabled = true; } else { btnDraft.Enabled = false; btnFinalize.Enabled = false; btnPreview.Enabled = false; } } }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); this.LoadDueValidation(); if (!Page.IsPostBack) { //lblWeekDates.Text = WeekYear.GetWeekName(Convert.ToInt16(WeekYear.GetActiveWeekCode())).ToString() + " (" + WeekYear.GetDateStart(Convert.ToInt16(WeekYear.GetActiveWeekCode())).ToString("MMM dd, yyyy") + " - " + WeekYear.GetDateEnd(Convert.ToInt16(WeekYear.GetActiveWeekCode())).ToString("MMM dd, yyyy") + ")"; 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.LoadDSLs(); this.LoadContents(); if (EmployeeReviewer.GetReviewer(Request.Cookies["Speedo"]["UserName"].ToString()).Length > 0) { lblReviewer.ForeColor = Color.Black; lblReviewer.Text = EmployeeReviewer.GetReviewer(Request.Cookies["Speedo"]["UserName"].ToString()); } else { lblReviewer.ForeColor = Color.Red; lblReviewer.Text = "No assigned reviewer."; } } }