protected void LoadApproverDivision() { string strWrite = ""; string strUsername = Request.Cookies["Speedo"]["UserName"]; DataTable tblForApprovalDH = GroupUpdateApproval.GetDSGForApprovalLevel2(strUsername); foreach (DataRow drw in tblForApprovalDH.Rows) { strWrite = strWrite + "<tr>" + "<td class='GridRows'>" + "<a href='GroupUpdateDH.aspx?GroupUpdateCode=" + drw["GroupUpdateCode"].ToString() + "'><img src='../Support/" + clsGroupUpdate.GetRequestStatusIcon(drw["Status"].ToString()) + "' alt='' /></a>" + "</td>" + "<td class='GridRows'>" + "<a href='GroupUpdateDH.aspx?GroupUpdateCode=" + drw["GroupUpdateCode"].ToString() + "' style='font-size:small;'>" + clsString.CutString(drw["Title"].ToString(), 50) + "</a><br>" + "Sent by: <a href='../Userpage/UserPage.aspx?username="******"CreateBy"].ToString() + "'>" + drw["CreateBy"].ToString() + "</a><br>" + "Date Created: " + Convert.ToDateTime(drw["CreateOn"].ToString()).ToString("MMM dd, yyyy hh:mm tt") + "</td>" + "</tr>"; } Response.Write(strWrite); if (tblForApprovalDH.Rows.Count == 0) { Response.Write("<tr><td colspan='3' class='GridRows'>No record found</td></tr>"); } else { Response.Write("<tr><td colspan='3' class='GridRows'>[ " + tblForApprovalDH.Rows.Count + " records found ]</td></tr>"); } }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); ValidateUser(); //ckeContents.config.toolbar = new object[] // { // new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "SpellChecker", "Scayt" }, // new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" }, // "/", // new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" }, // new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" }, // new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" }, // "/", // new object[] { "Styles", "Format", "Font", "FontSize" }, // new object[] { "TextColor", "BGColor" }, // }; ckeContents.config.toolbar = new object[] { new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "SpellChecker", "Scayt" }, new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" }, new object[] { "Image", "Table", "HorizontalRule", "Smiley", "SpecialChar" }, "/", new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" }, new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" }, new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" }, "/", new object[] { "Styles", "Format", "Font", "FontSize" }, new object[] { "TextColor", "BGColor" }, }; if (!Page.IsPostBack) { string strUsername = Request.Cookies["Speedo"]["UserName"]; int intGroupUpdateCode = Request.QueryString["GroupUpdateCode"].ToString().ToInt(); using (clsGroupUpdate objView = new clsGroupUpdate()) { objView.GroupUpdateCode = intGroupUpdateCode; objView.Fill(); txtTitle.Text = objView.Title; txtDescription.Text = objView.Description; lblGroupHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "1")); txtGroupHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "1"); //lblDivisionHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "2")); //txtDivisionHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "2"); txtPhotoSource.Text = objView.PhotoSource; hdnGroupHead.Value = GroupUpdateApproval.GetApprover(GroupUpdateApproval.GroupUpdateUserType.GroupHead, clsEmployee.GetDepartmentCode(strUsername)); ckeContents.Text = objView.Content; txtContributor.Text = objView.Contributor; } } }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); ValidateUser(); string strUsername = Request.Cookies["Speedo"]["UserName"]; int intGroupUpdateCode = Request.QueryString["GroupUpdateCode"].ToString().ToInt(); string strStatus = ""; using (clsGroupUpdate objView = new clsGroupUpdate()) { objView.GroupUpdateCode = intGroupUpdateCode; objView.Fill(); if (objView.Status == "0") { strStatus = "For Approval"; } else if (objView.Status == "1") { strStatus = "Approved"; } else if (objView.Status == "2") { strStatus = "Disapproved"; } else if (objView.Status == "3") { strStatus = "Voided"; } lblContributor.Text = objView.Contributor; lblTitle.Text = objView.Title; lblCreateBy.Text = clsEmployee.GetName(objView.CreateBy); lblCreateOn.Text = Convert.ToDateTime(objView.CreateOn).ToString("MMM dd, yyyy"); //lblLink.Text = "<a href='../UploadedFiles/GroupUpdates/" + objView.ImageFilename + "' target='_blank'>View Image</a>"; lblImage.Text = "<img src='../UploadedFiles/GroupUpdates/" + objView.ImageFilename + "' width='200' height='119' alt='' /></a>"; lblDescription.Text = objView.Description; lblContent.Text = objView.Content; lblStatus.Text = strStatus; lblPhotoSource.Text = objView.PhotoSource; lblGroupHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "1")); txtGroupHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "1"); //lblDivisionHead.Text = clsEmployee.GetName(GroupUpdateApproval.GetApproverName(intGroupUpdateCode.ToString(), "2")); //txtDivisionHeadRemark.Text = GroupUpdateApproval.GetApproverRemarks(intGroupUpdateCode.ToString(), "2"); } }
protected void LoadNotification() { string strWrite = ""; int intpMrcfUnread = 0; int intpRequisitionUnread = 0; int intpCrs = 0; string strpUserName = Request.Cookies["Speedo"]["UserName"].ToString(); //imgpnlavatar.ImageUrl = "~/pictures/realpicture/" + clsSpeedo.GetRealPicture(strpUserName) + ".jpg"; int intpNotificationUnread = clsMessage.CountUnRead(strpUserName); int intpATW = clsATW.GetTotalForAttention(Request.Cookies["Speedo"]["UserName"].ToString()); if (intpATW > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/HR/HRMS/ATW/ATWMenu.aspx'> Authority To Work (" + intpATW + ")</a></div>"; //lnkpnllftATW.Text = "<b>Authority to Work (" + intpATW + ")</b>"; //lnkpnllftATW.Font.Bold = true; } int intGroupUpdate = GroupUpdateApproval.GetCountForModification(Request.Cookies["Speedo"]["UserName"].ToString()) + GroupUpdateApproval.GetCountForApprovalLevel1(Request.Cookies["Speedo"]["UserName"].ToString()) + GroupUpdateApproval.GetCountForApprovalLevel2(Request.Cookies["Speedo"]["UserName"].ToString()); if (intGroupUpdate > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/GroupUpdate/GroupUpdateMain.aspx'> Group Update (" + intGroupUpdate + ")</a></div>"; //lnkpnllftATW.Text = "<b>Authority to Work (" + intpATW + ")</b>"; //lnkpnllftATW.Font.Bold = true; } int intpIAR = clsIAR.GetTotalForAttention(Request.Cookies["Speedo"]["UserName"].ToString()); if (intpIAR > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/HR/HRMS/IAR/IARMenu.aspx'> Internet Request (" + intpIAR + ")</a></div>"; //lnkpnllftIAR.Text = "<b>Internet Request (" + intpIAR + ")</b>"; //lnkpnllftIAR.Font.Bold = true; } using (SqlConnection cnp = new SqlConnection(ConfigurationManager.ConnectionStrings["Speedo"].ToString())) { SqlCommand cmdp = cnp.CreateCommand(); cmdp.CommandText = "SELECT COUNT(mrcfcode) FROM CIS.Mrcf WHERE (username='******' AND status='M') OR (sprvcode='" + strpUserName + "' AND sprvstat='F') OR (headcode='" + strpUserName + "' AND headstat='F' AND sprvstat IN ('A','X','N')) OR (proccode='" + strpUserName + "' AND procstat='F' AND ((sprvstat='A' AND headstat='N') OR (headstat='A')))"; cnp.Open(); intpMrcfUnread = (int)cmdp.ExecuteScalar(); //Updated by charlie bachiller //Updated due to voided transaction on requisition still counted //cmdp.CommandText = "SELECT COUNT(requcode) FROM CIS.Requisition WHERE (username='******' AND status='M') OR (sprvcode='" + strpUserName + "' AND sprvstat='F') OR (headcode='" + strpUserName + "' AND headstat='F' AND sprvstat IN ('A','X','N')) OR (suppcode='" + strpUserName + "' AND (suppstat='F' OR suppstat='P'))"; cmdp.CommandText = "SELECT COUNT(requcode) FROM CIS.Requisition WHERE ((username='******' AND status='M') OR (sprvcode='" + strpUserName + "' AND sprvstat='F' AND status='F') OR (headcode='" + strpUserName + "' AND headstat='F' AND sprvstat IN ('A','X','N') AND status='F') OR (suppcode='" + strpUserName + "' AND (suppstat='F' OR suppstat='P') AND status IN ('A','P')))"; intpRequisitionUnread = (int)cmdp.ExecuteScalar(); //cmdp.CommandText = "SELECT COUNT(username) FROM Users.Users WHERE DATEPART(mm,brthdate)='" + DateTime.Now.Month + "' AND DATEPART(dd,brthdate)='" + DateTime.Now.Day + "' AND pstatus='1'"; //intpCelebrants = (int)cmdp.ExecuteScalar(); cmdp.CommandText = "SELECT COUNT(crscode) FROM CM.Crs WHERE (cmhname='" + strpUserName + "' AND crscode IN (SELECT DISTINCT crscode FROM CM.CrsDetails WHERE pstatus='F')) OR (ccname='" + strpUserName + "' AND crscode IN (SELECT DISTINCT crscode FROM CM.CrsDetails WHERE pstatus='E' OR pstatus='P'))"; intpCrs = (int)cmdp.ExecuteScalar(); } if (intpMrcfUnread > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/CIS/MRCF/MRCFMenu.aspx'> MRCF (" + intpMrcfUnread + ")</a></div>"; //lnkpnllftMRCF.Text = "<b>MRCF (" + intpMrcfUnread + ")</b>"; } if (intpRequisitionUnread > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/CIS/Requisition/RequMenu.aspx'> Requisition (" + intpRequisitionUnread + ")</a></div>"; //lnkpnllftRequisition.Text = "<b>Requisition (" + intpRequisitionUnread + ")</b>"; //lnkpnllftRequisition.Font.Bold = true; } //Added by charlie for cata //add by charlie int intCtrCATA = 0; DataTable tblEndorserApproval = clsCATAApproval.GetDSGForApprovalEndorser(Request.Cookies["Speedo"]["UserName"]); DataTable tblAuthorizeApproval = clsCATAApproval.GetDSGForApprovalAuthorize(Request.Cookies["Speedo"]["UserName"]); intCtrCATA = tblEndorserApproval.Rows.Count + tblAuthorizeApproval.Rows.Count; if (intCtrCATA > 0) { lnkpnllftFinanceCataRequestMenu.Text = "<b>Request for CATA (" + intCtrCATA + ")</b>"; lnkpnllftFinanceCataRequestMenu.Font.Bold = true; } ////cata for approvals //Added by charlie for RFP int intpRFP = 0; int intCtrRFP = 0; DataTable tblRFP = clsRFPRequest.GetDSGMainFormApprover(Request.Cookies["Speedo"]["UserName"]); foreach (DataRow drw in tblRFP.Rows) { if (clsFinanceApprover.IsAuthoritary(Request.Cookies["Speedo"]["UserName"], "ctrlnmbr", drw["ControlNumber"].ToString(), "RFPRequest")) { if (drw["Endorsed1Status"].ToString().Trim() == "2" && drw["Endorsed2Status"].ToString().Trim() == "") { continue; } else if (drw["Endorsed1Status"].ToString().Trim() == "2" && drw["Endorsed2Status"].ToString().Trim() == "2") { continue; } else if (drw["Endorsed1Status"].ToString().Trim() == "2" && drw["Endorsed2Status"].ToString().Trim() == "1") { continue; } else if (drw["Endorsed1Status"].ToString().Trim() == "1" && drw["Endorsed2Status"].ToString().Trim() == "2") { continue; } else { intpRFP += 1; } } else if (clsFinanceApprover.IsEndorder1(Request.Cookies["Speedo"]["UserName"], "ctrlnmbr", drw["ControlNumber"].ToString(), "RFPRequest")) { if (drw["Endorsed1Status"].ToString().Trim() != "2") { continue; } else { intpRFP += 1; } } else if (clsFinanceApprover.IsEndorder2(Request.Cookies["Speedo"]["UserName"], "ctrlnmbr", drw["ControlNumber"].ToString(), "RFPRequest")) { if (drw["Endorsed2Status"].ToString().Trim() != "2") { continue; } else { intpRFP += 1; } } else { intpRFP += 1; } intCtrRFP++; } if (intCtrRFP > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/Finance/RFP/RFPMenu.aspx'> Request For Payment (" + intpRFP + ")</a></div>"; //lnkpnllftFinanceRequest.Text = "<b>Request for Payment (" + intpRFP + ")</b>"; //lnkpnllftFinanceRequest.Font.Bold = true; } //if (intpCelebrants > 0) // lnkpnllftBirthday.Text = "<b>Birthday Celebrators (" + intpCelebrants + ")</b>"; //if (intpCrs > 0) // lnkpnlrgtCMDCRS.Text = "<b>Courseware Request (" + intpCrs + ")</b>"; ////////////////////////// ////// HRMS Summary ////// ////////////////////////// int intpLeave = clsLeave.GetTotalForAttention(Request.Cookies["Speedo"]["UserName"].ToString()); if (intpLeave > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/HR/HRMS/Leave/LeaveMenu.aspx'> Leave (" + intpLeave + ")</a></div>"; //lnkpnllftLeave.Text = "<b>Leave (" + intpLeave + ")</b>"; //lnkpnllftLeave.Font.Bold = true; } int intpOvertime = clsOvertime.GetTotalForAttention(Request.Cookies["Speedo"]["UserName"].ToString()); if (intpOvertime > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/HR/HRMS/Overtime/OvertimeMenu.aspx'> Overtime (" + intpOvertime + ")</a></div>"; //lnkpnllftOvertime.Text = "<b>Overtime (" + intpOvertime + ")</b>"; //lnkpnllftOvertime.Font.Bold = true; } int intpOB = clsOB.GetTotalForAttention(Request.Cookies["Speedo"]["UserName"]); if (intpOB > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/HR/HRMS/OB/OBMenu.aspx'> Official Business (" + intpOB + ")</a></div>"; //lnkpnllftOB.Text = "<b>OB (" + intpOB + ")</b>"; //lnkpnllftOB.Font.Bold = true; } int intpUndertime = clsUndertime.GetTotalForAttention(Request.Cookies["Speedo"]["UserName"].ToString()); if (intpUndertime > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/HR/HRMS/Undertime/UndertimeMenu.aspx'> Undertime (" + intpUndertime + ")</a></div>"; //lnkpnllftUndertime.Text = "<b>Undertime (" + intpUndertime + ")</b>"; //lnkpnllftUndertime.Font.Bold = true; } //Reward Points Notification if (Request.Cookies["Speedo"]["UserName"].ToString() == "liezel.diego" || Request.Cookies["Speedo"]["UserName"].ToString() == "jay.jamandre" || Request.Cookies["Speedo"]["UserName"].ToString() == "giselle.batalla") { int intReward = 0; if (Request.Cookies["Speedo"]["UserName"].ToString() == "liezel.diego") { intReward = clsRewardApproval.GetDSGForApprovalLevel1("liezel.diego").Rows.Count; } else if (Request.Cookies["Speedo"]["UserName"].ToString() == "jay.jamandre") { intReward = clsRewardApproval.GetDSGForApprovalLevel2("jay.jamandre").Rows.Count; } else { intReward = clsRewardApproval.ForModification(); } if (intReward > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/RewardPoint/TransactionMain.aspx'> Rewards Point (" + intReward + ")</a></div>"; } } ////////////////////////// ////// MRCF Assign /////// ////////////////////////// int intAssignMRCF = clsMRCFAssign.GetTotalAssigned(Request.Cookies["Speedo"]["UserName"].ToString()); if (intAssignMRCF > 0) { strWrite += "<div class='masterpanelcontent'><a href='" + clsSystemConfigurations.PortalRootURL + "/CIS/MRCF/MRCFMenu.aspx'> Assigned MRCF (" + intAssignMRCF + ")</a></div>"; } if (strWrite.Length > 0) { divNotification.Visible = true; ltNotification.Text = strWrite; } else { divNotification.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); ValidateUser(); //ckeContents.config.toolbar = new object[] // { // new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "SpellChecker", "Scayt" }, // new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" }, // "/", // new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" }, // new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" }, // new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" }, // "/", // new object[] { "Styles", "Format", "Font", "FontSize" }, // new object[] { "TextColor", "BGColor" }, // }; //<CKEditor:CKEditorControl ID="ckeContents" runat="server" BackColor="White" //CssClass="controls" Height="300px" ToolbarFull="Cut|Copy|Paste|PasteText|PasteFromWord|-|SpellChecker|Scayt // Undo|Redo|-|Find|Replace|-|Bold|Italic|Underline|Strike // Image|Table|HorizontalRule|Smiley|SpecialChar // / // NumberedList|BulletedList|-|Outdent|Indent|Blockquote|CreateDiv // JustifyLeft|JustifyCenter|JustifyRight|JustifyBlock // Link|Unlink|Anchor // TextColor|BGColor // Subscript|Superscript // / // Styles|Format|Font|FontSize" Width="98%" /> ckeContents.config.toolbar = new object[] { new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "SpellChecker", "Scayt" }, new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" }, new object[] { "Image", "Table", "HorizontalRule", "Smiley", "SpecialChar" }, "/", new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" }, new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" }, new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" }, "/", new object[] { "Styles", "Format", "Font", "FontSize" }, new object[] { "TextColor", "BGColor" }, }; //if (hndGroupUpdateCode.Value != string.Empty) //{ // //Response.Redirect("GroupUpdatePreview.aspx?GroupUpdateCode=" + hdnGroupHead.Value); // btnPreview.OnClientClick = "javascript:window.open('GroupUpdatePreview.aspx?GroupUpdateCode=" + hndGroupUpdateCode.Value + "');"; //} if (!Page.IsPostBack) { string username = Request.Cookies["Speedo"]["UserName"]; hdnGroupHead.Value = GroupUpdateApproval.GetApprover(GroupUpdateApproval.GroupUpdateUserType.GroupHead, clsEmployee.GetDepartmentCode(username)); //hdnDivisionHead.Value = GroupUpdateApproval.GetApprover(GroupUpdateApproval.GroupUpdateUserType.DivisionHead, clsEmployee.GetDepartmentCode(username)); } }
protected void LoadUpdates() { string strWrite = ""; string strStatus = ""; string strLink = ""; string strPreview = ""; foreach (DataRow drNews in clsGroupUpdate.GetDSG(Request.Cookies["Speedo"]["UserName"]).Rows) { if (drNews["Status"].ToString() == "0") { strStatus = "For Approval of <a href='../Userpage/UserPage.aspx?username="******"GroupUpdateCode"].ToString()) + "'>" + GroupUpdateApproval.ForApproval(drNews["GroupUpdateCode"].ToString()) + "</a>"; strLink = "GroupUpdateDetailsMain"; strPreview = ""; } else if (drNews["Status"].ToString() == "1") { strStatus = "Approved"; strLink = "GroupUpdateDetailsMain"; strPreview = ""; } else if (drNews["Status"].ToString() == "2") { strStatus = "Disapproved"; strLink = "GroupUpdateDetailsMain"; strPreview = ""; } else if (drNews["Status"].ToString() == "3") { strStatus = "Void"; strLink = "GroupUpdateDetailsMain"; strPreview = ""; } else if (drNews["Status"].ToString() == "4") { strStatus = "For Modification"; strLink = "GroupUpdateEdit"; strPreview = ""; } else if (drNews["Status"].ToString() == "5") { strStatus = "Saved as Draft"; strLink = "GroupUpdateEdit"; strPreview = "<a href='GroupUpdatePreview.aspx?GroupUpdateCode=" + drNews["GroupUpdateCode"].ToString() + "' style='font-size:x-small;' target='_blank'>Click for preview</a><br>"; } strWrite = strWrite + "<tr>" + "<td><img src='../Support/" + clsGroupUpdate.GetRequestStatusIcon(drNews["Status"].ToString()) + "' alt='' /></td>" + "<td class='GridRows'>" + "<a href='" + strLink + ".aspx?GroupUpdateCode=" + drNews["GroupUpdateCode"].ToString() + "' style='font-size:small;'>" + clsString.CutString(drNews["Title"].ToString(), 40) + "</a><br>" + strPreview + "Submitted by: <a href='../../../Userpage/UserPage.aspx?username="******"CreateBy"] + "'>" + drNews["CreateBy"] + "</a><br>" + "Date Created: " + Convert.ToDateTime(drNews["CreateOn"].ToString()).ToString("MMM dd, yyyy") + "</td>" + "<td class='GridRows'>" + strStatus + "</td>" + "</tr>"; } Response.Write(strWrite); }