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;
    }
Ejemplo n.º 2
0
    protected void LoadUpdates()
    {
        string strWrite   = "";
        string strStatus  = "";
        string strLink    = "";
        string strPreview = "";

        foreach (DataRow drJournal in EmployeeJournal.GetDSG(Request.Cookies["Speedo"]["UserName"], Convert.ToInt16(ddlJournalYear.SelectedValue), ddlJournalDates.SelectedValue.ToString()).Rows)
        {
            //if (WeekYear.GetActiveWeekCode().ToString() == drJournal["WeekCode"].ToString())
            //{
            if (EmployeeJournal.GetJournalStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "S" && EmployeeJournal.GetLockStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "0")
            {
                strLink  = "JournalEncoding";
                strWrite = strWrite + "<tr>" +
                           "<td class='GridRows'><img src='../Support/Pending.png' alt='' width='16' height='16' /></td>" +
                           "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
                           "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
                           "</tr>";
            }
            else if (EmployeeJournal.GetJournalStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "F" && EmployeeJournal.GetLockStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "0")
            {
                strLink  = "JournalEncodingM";
                strWrite = strWrite + "<tr>" +
                           "<td class='GridRows'><img src='../Support/MRCF_New.png' alt='' width='16' height='16' /></td>" +
                           "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
                           "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
                           "</tr>";
            }
            else
            {
                strLink  = "JournalViewer";
                strWrite = strWrite + "<tr>" +
                           "<td class='GridRows'><img src='../Support/MRCF_View.png' alt='' width='16' height='16' /></td>" +
                           "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
                           "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
                           "</tr>";
            }
            //}
            //else
            //{
            //    strLink = "JournalViewer";
            //    strWrite = strWrite + "<tr>" +
            //                          "<td class='GridRows'><img src='../Support/MRCF_View.png' alt='' /></td>" +
            //                          "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
            //                          "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
            //                          "</tr>";
            //}
        }
        //Response.Write(strWrite);
        lblWrite.Text = strWrite;
    }
Ejemplo n.º 3
0
    protected void LoadUpdates()
    {
        string strWrite   = "";
        string strStatus  = "";
        string strLink    = "";
        string strPreview = "";

        foreach (DataRow drJournal in EmployeeJournal.GetDSG(ddlEmployee.SelectedValue.ToString(), Convert.ToInt16(ddlJournalYear.SelectedValue), ddlJournalDates.SelectedValue.ToString()).Rows)
        {
            if (EmployeeJournal.GetJournalStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "S" && EmployeeJournal.GetLockStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "0")
            {
                strLink  = "JournalViewer";
                strWrite = strWrite + "<tr>" +
                           "<td class='GridRows'><img src='../Support/MRCF_New.png' alt='' /></td>" +
                           "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
                           "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
                           "</tr>";
            }
            else if (EmployeeJournal.GetJournalStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "F" && EmployeeJournal.GetLockStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "0")
            {
                strLink  = "JournalViewer";
                strWrite = strWrite + "<tr>" +
                           "<td class='GridRows'><img src='../Support/MRCF_New.png' alt='' /></td>" +
                           "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
                           "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
                           "</tr>";
            }
            else if (EmployeeJournal.GetJournalStatus(Convert.ToInt16(drJournal["JournalCode"])).ToString() == "A")
            {
                strLink  = "JournalViewer";
                strWrite = strWrite + "<tr>" +
                           "<td class='GridRows'><img src='../Support/Approved.png' alt='' width='16' height='16' /></td>" +
                           "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
                           "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
                           "</tr>";
            }
            else
            {
                strLink  = "JournalViewer";
                strWrite = strWrite + "<tr>" +
                           "<td class='GridRows'><img src='../Support/hammer128.png' alt='' width='16' height='16' /></td>" +
                           "<td class='GridRows'><a href='" + strLink + ".aspx?JournalCode=" + drJournal["JournalCode"].ToString() + "' style='font-size:small;'>" + drJournal["WeekName"].ToString() + " (" + Convert.ToDateTime(drJournal["DateStart"].ToString()).ToString("MMM dd, yyyy") + " - " + Convert.ToDateTime(drJournal["DateEnd"].ToString()).ToString("MMM dd, yyyy") + ") </a><br></td>" +
                           "<td class='GridRows'>" + drJournal["ModifiedOn"].ToString() + "</td>" +
                           "</tr>";
            }
        }
        //Response.Write(strWrite);
        lblWrite.Text = strWrite;
    }