protected void btnDisapprove_Click(object sender, EventArgs e)
    {
        using (EmployeeJournal objEmployeeJournal = new EmployeeJournal())
        {
            objEmployeeJournal.EmployeeJournalCode = Convert.ToInt16(Request.QueryString["JournalCode"]);
            objEmployeeJournal.JournalStatus       = "F";
            objEmployeeJournal.LockStatus          = "0";
            objEmployeeJournal.Enabled             = "1";
            objEmployeeJournal.ModifiedBy          = Request.Cookies["Speedo"]["UserName"].ToString();
            if (objEmployeeJournal.UpdateStatus() > 0)
            {
                using (EmployeeJournalApproval objEmployeeJournalApproval = new EmployeeJournalApproval())
                {
                    objEmployeeJournalApproval.EmployeeJournalACode = EmployeeJournalApproval.GetForApprovalJournalACode(objEmployeeJournal.EmployeeJournalCode);
                    objEmployeeJournalApproval.JournalAStatus       = "D";
                    if (EmployeeJournalApproval.GetForApprovalJournalAOrder(objEmployeeJournal.EmployeeJournalCode) == 1)
                    {
                        objEmployeeJournalApproval.Remarks = txtDepartmentHeadsRemarks.Text;
                    }
                    //else if (EmployeeJournalApproval.GetForApprovalJournalAOrder(objEmployeeJournal.EmployeeJournalCode) == 2)
                    //{
                    //    objEmployeeJournalApproval.Remarks = txtDivisionHeadsRemarks.Text;
                    //}

                    if (objEmployeeJournalApproval.UpdateStatus() > 0)
                    {
                        Response.Redirect("EmployeeJournalListA.aspx");
                    }
                }
            }
        }
    }
    protected void btnApprove_Click(object sender, EventArgs e)
    {
        using (EmployeeJournal objEmployeeJournal = new EmployeeJournal())
        {
            //objEmployeeJournal.EmployeeJournalCode = EmployeeJournal.GetLastJournalCode(Convert.ToInt16(WeekYear.GetActiveWeekCode()), Request.Cookies["Speedo"]["UserName"].ToString());
            objEmployeeJournal.EmployeeJournalCode = Convert.ToInt16(Request.QueryString["JournalCode"]);
            objEmployeeJournal.LockStatus          = "1";
            objEmployeeJournal.Enabled             = "1";
            objEmployeeJournal.JournalStatus       = "A";
            objEmployeeJournal.ModifiedBy          = Request.Cookies["Speedo"]["UserName"].ToString();
            if (objEmployeeJournal.UpdateStatus2() > 0)
            {
                using (EmployeeJournalApproval objEmployeeJournalApproval = new EmployeeJournalApproval())
                {
                    objEmployeeJournalApproval.EmployeeJournalACode = EmployeeJournalApproval.GetForApprovalJournalACode(objEmployeeJournal.EmployeeJournalCode);
                    objEmployeeJournalApproval.JournalAStatus       = "A";
                    if (EmployeeJournalApproval.GetForApprovalJournalAOrder(objEmployeeJournal.EmployeeJournalCode) == 1)
                    {
                        objEmployeeJournalApproval.Remarks = txtDepartmentHeadsRemarks.Text;
                    }
                    //else if (EmployeeJournalApproval.GetForApprovalJournalAOrder(objEmployeeJournal.EmployeeJournalCode) == 2)
                    //{
                    //    objEmployeeJournal.JournalStatus = "A";
                    //    objEmployeeJournal.UpdateStatus();
                    //    objEmployeeJournalApproval.Remarks = txtDivisionHeadsRemarks.Text;
                    //}

                    if (objEmployeeJournalApproval.UpdateStatus() > 0)
                    {
                        objEmployeeJournal.SendNotification(EmployeeJournal.EJSMailType.ApprovedNotificationRequestor, EmployeeJournal.GetRequestor(objEmployeeJournal.EmployeeJournalCode), EmployeeJournalApproval.GetApprover(objEmployeeJournal.EmployeeJournalCode, "1"));
                        objEmployeeJournal.SendNotification(EmployeeJournal.EJSMailType.ApprovedAcknowledgementApprover, EmployeeJournal.GetRequestor(objEmployeeJournal.EmployeeJournalCode), EmployeeJournalApproval.GetApprover(objEmployeeJournal.EmployeeJournalCode, "1"));

                        Response.Redirect("EmployeeJournalListFApproval.aspx");
                    }
                }
            }
        }
    }