Ejemplo n.º 1
0
 /// <summary>
 /// Removes a trial.
 /// </summary>
 /// <param name="contextTrialTitle">The context trial title.</param>
 public void RemoveATrial(string contextTrialTitle)
 {
     MySiteTrialsSearch.Clear();
     MySiteTrialsSearch.SendKeys(contextTrialTitle);
     ActionDropDown.Click();
     RemoveButton.Click();
     PageHelper.WaitForElement(Driver, RemoveTrialPopUp);
     RemoveTrialMessage.Text.Should().BeEquivalentTo(ErrorMessages.RemoveTrial_MySiteTrial);
     ConfirmRemoveButton.Click();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Abandons the created trial.
 /// </summary>
 /// <param name="contextTrialTitle">The context trial title.</param>
 public void AbandonTheCreatedTrial(string contextTrialTitle)
 {
     CreatedTrialRecord.Click();
     FIllInMandatoryTrialDates();
     TrialAbandoned.Click();
     Thread.Sleep(TimeSpan.FromSeconds(2));
     CalenderToday.Click();
     FillInTrialDetailsAndActivity();
     SaveTrialDetails.Click();
     Thread.Sleep(TimeSpan.FromSeconds(8));
     PageHelper.WaitForElement(Driver, ActionDropDown);
     ActionDropDown.Click();
     ArchiveButton.Click();
     PageHelper.WaitForElement(Driver, ArchiveTrialPopUp);
     Thread.Sleep(TimeSpan.FromSeconds(2));
     ConfirmArchiveButton.Click();
 }
Ejemplo n.º 3
0
    protected void Submit_Click(object sender, EventArgs e)
    {
        SqlConnection con1 = new SqlConnection(constring);
        //SqlConnection con1 = new SqlConnection(@"Data Source=HI-PC\SQLEXPRESS; Database =ERSDB; Integrated Security=True");
        DataTable dt = new DataTable();

        con1.Open();
        DateTime date = DateTime.Now;

        date = Convert.ToDateTime(date.ToShortDateString());
        //Fetching Claim Details from ERSClaim Table based on ClaimID
        int            i   = 0;
        DataTable      dt3 = new DataTable();
        DataRow        dr3;
        SqlDataAdapter da3 = new SqlDataAdapter("Select ERSClaimType,ERSClaimDate,ERSBillAmount,ERSClaimStatus,ERSClaimApproverRemarks,ERSClaimProcessDate,ERSDescription,ERSApproverID,ERSEmployeeID from ERSClaim where ERSApproverID='" + Session["SessionEmployeeID"].ToString() + "'and ERSClaimID='" + claimId.Text + "'", con1);

        da3.Fill(dt3);
        dr3 = dt3.Rows[i];
        string claimid         = claimId.Text;
        string Type            = Convert.ToString(dr3[0]);
        string Date            = Convert.ToString(dr3[1]);
        string BillAmount      = Convert.ToString(dr3[2]);
        string ClaimStatus     = Convert.ToString(dr3[3]);
        string ApproverRemarks = Convert.ToString(dr3[4]);
        // string ProcessDate = Convert.ToString(dr3[5]);
        string Description = Convert.ToString(dr3[6]);
        string Approverid  = Convert.ToString(dr3[7]);

        employeeid = Convert.ToString(dr3[8]);
        DataTable      dt4 = new DataTable();
        DataRow        dr4;
        SqlDataAdapter da4 = new SqlDataAdapter("Select EmployeeName,EmployeeMailID from Employee where EmployeeID='" + employeeid + "'", con1);

        da4.Fill(dt4);
        dr4 = dt4.Rows[i];
        string ename  = Convert.ToString(dr4[0]);
        string mailid = Convert.ToString(dr4[1]);

        if (Session["SessionEmployeeID"].ToString() == "SNPL-HYD-2048")
        {
            actionlevel = "Level 1";
        }
        else if (Session["SessionEmployeeID"].ToString() == "SNPL-HYD-2016")
        {
            actionlevel = "Level 2";
        }
        else if (Session["SessionEmployeeID"].ToString() == "SNPL-HYD-1107")
        {
            actionlevel = "Level 3";
        }
        if (ActionDropDown.SelectedValue == "Need Clarification")
        {
            SqlDataReader myReader  = null;
            SqlCommand    myCommand = new SqlCommand("update ERSClaim set ERSClaimStatus=@var2 ,ERSClaimApproverRemarks=@var3 where ERSClaimID='" + claimId.Text + "'", con1);
            myCommand.Parameters.AddWithValue("@var2", ActionDropDown.SelectedValue);
            myCommand.Parameters.AddWithValue("@var3", remarks.Text);
            myReader = myCommand.ExecuteReader();

            // Triggering a Mail to Employee Regarding Claim Status
            string subject = "ERS- Claim Request Process Acknowledgement";
            string body    = "Dear \t" + " " + ename + ",<br /><br /> Your Claim request with the following details should require clarification\n\n<br /><br /> Claim ID: \t" + claimid
                             + "\n<br />Date: \t" + Date + "\n<br />Type: \t" + Type +
                             "\n<br />Description: \t" + Description + "\n<br />Amount: \t" + BillAmount +
                             "\n<br />Status: \t" + ActionDropDown.SelectedValue + "\n\n<br /><br />" +
                             "\n<br /> Approver ID: \t" + Approverid + "\n<br />Approver Remarks: \t" + remarks.Text +
                             "<br />Please click here to  <a href=\"http://192.168.0.105/Login.aspx\">login</a>" +
                             "\n\n\n<br /><br />Thanks And Regards<br />\nERS Team<br />\nSNPL";
            sendMailToEmployee(subject, body, mailid);
            ActionDropDown.ClearSelection();
            alertmodal.Style.Add("background-color", "#d7ecc6");
            Alert.Style.Add("background-color", "#d7ecc6");
            Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
            Label9.ForeColor = System.Drawing.ColorTranslator.FromHtml("black");
            //Label2.Text = "Success!";
            //Label5.Text = "Employee has been Deleted";
            //alert.Visible = true;
            remarks.Text = " ";
            // suc.Visible = true;
            Label7.Text   = "Success!";
            Label9.Text   = "Clarification request is sent ";
            Alert.Visible = true;
            grid();
            // ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Clarification request is sent ');", true);
        }
        //Start ..... Code for find Approver Action Level//
        if (ActionDropDown.SelectedValue == "Approved")
        {
            //End ..... Code for find Approver Action Level//
            DateTime      CPdate    = DateTime.Now;
            SqlDataReader myReader  = null;
            SqlCommand    myCommand = new SqlCommand("update ERSClaim set ERSClaimProcessDate=@var1 ,ERSClaimStatus=@var2 ,ERSClaimApproverRemarks=@var3 where ERSClaimID='" + claimId.Text + "'", con1);
            myCommand.Parameters.AddWithValue("@var1", CPdate);
            myCommand.Parameters.AddWithValue("@var2", ActionDropDown.SelectedValue);
            myCommand.Parameters.AddWithValue("@var3", remarks.Text);
            myReader = myCommand.ExecuteReader();

            // Triggering a Mail to Employee Regarding Claim Status
            string subject = "ERS-Claim Request Process Acknowledgement";
            string body    = "Dear \t" + " " + ename + ",<br /><br /> Your Claim request with the following details has been Approved by Approver\n\n<br /><br /> Claim ID: \t" + claimid
                             + "\n<br />Date: \t" + Date + "\n<br />Type: \t" + Type +
                             "\n<br />Description: \t" + Description + "\n<br />Amount: \t" + BillAmount +
                             "\n<br />Status: \t" + ActionDropDown.SelectedValue + "\n\n<br /><br />" + "\n<br />Approver Remarks: \t" + remarks.Text +
                             "\n<br />Process Date: \t" + CPdate + "\n<br /> Approver ID: \t" + Approverid +
                             "<br />Please click here to  <a href=\"http://192.168.0.105/Login.aspx\">login</a>" +
                             "\n\n\n<br /><br />Thanks And Regards<br />\nERS Team<br />\nSNPL";
            sendMailToEmployee(subject, body, mailid);
            ActionDropDown.ClearSelection();
            remarks.Text = " ";
            // suc.Visible = true;
            alertmodal.Style.Add("background-color", "#d7ecc6");
            Alert.Style.Add("background-color", "#d7ecc6");
            Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
            Label9.ForeColor = System.Drawing.ColorTranslator.FromHtml("black");
            //Label2.Text = "Success!";
            //Label5.Text = "Employee has been Deleted";
            //alert.Visible = true;
            Label7.Text   = "Success!";
            Label9.Text   = "Claim has been Approved";
            Alert.Visible = true;
            grid();
            // ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Claim has been Approved');", true);

            //Response.Redirect("ApproverDashboard.aspx");//Redirecting to Dashboard After Action Done
        }
        else if (ActionDropDown.SelectedValue == "Rejected")
        {
            //Start ...... Code for find Approver Action Level//
            //if (Session["ApproverID2"].ToString() == "SNPL-HYD-2048")
            //{
            //    actionlevel = "Level 1";
            //}
            //else if (Session["ApproverID2"].ToString() == "SNPL-HYD-2016")
            //{
            //    actionlevel = "Level 2";
            //}
            //else if (Session["ApproverID2"].ToString() == "SNPL-HYD-1107")
            //{
            //    actionlevel = "Level 3";
            //}
            //End .... Code for find Approver Action Level//

            DateTime      CPdate   = DateTime.Now;
            SqlDataReader myReader = null;
            //string Remarks = Request.Form["TextArea1"];
            //Label3.Text = "UnAuthorized Employee";
            SqlCommand myCommand = new SqlCommand("update ERSClaim set ERSClaimProcessDate=@var1 ,ERSClaimStatus=@var2 ,ERSClaimApproverRemarks=@var3 where ERSClaimID='" + claimId.Text + "'", con1);
            myCommand.Parameters.AddWithValue("@var1", CPdate);
            myCommand.Parameters.AddWithValue("@var2", ActionDropDown.SelectedValue);
            myCommand.Parameters.AddWithValue("@var3", remarks.Text);
            myReader = myCommand.ExecuteReader();
            //Triggering a Mail to Employee Regarding Claim Status
            // Triggering a Mail to Employee Regarding Claim Status
            string subject = "ERS-Claim Request Process Acknowledgement ";
            string body    = "Dear \t" + " " + ename + ",\n\n<br /><br /> Your Claim request with the following details has been Rejected by Approver\n\n<br /><br /> Claim ID:\t" + claimid
                             + "\n<br />Date: \t" + Date + "\n<br />Type: \t" + Type +
                             "\n<br />Description: \t" + Description + "\n<br />Amount: \t" + BillAmount + "\n<br />Status: \t" + ActionDropDown.SelectedValue + "\n\n<br />" + "\n<br />Approver Remarks: \t" + remarks.Text +
                             "\n<br />Process Date: \t" + CPdate + "\n<br /> Approver ID: \t" + Approverid +
                             "<br /><br />Please click here to  <a href=\"http://192.168.0.105/Login.aspx\">login</a>" +
                             "\n\n\n<br /><br />Thanks And Regards\n<br />ERS Team<br />\nSNPL";
            sendMailToEmployee(subject, body, mailid);
            ActionDropDown.ClearSelection();
            remarks.Text = " ";
            // suc.Visible = true;
            alertmodal.Style.Add("background-color", "#d7ecc6");
            Alert.Style.Add("background-color", "#d7ecc6");
            Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
            Label9.ForeColor = System.Drawing.ColorTranslator.FromHtml("black");
            //Label3.Text = "Success!";
            //Label5.Text = "Employee has been Deleted";
            //alert.Visible = true;
            Label7.Text   = "Success!";
            Label9.Text   = "Claim has been Rejected";
            Alert.Visible = true;
            grid();
            // ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Claim has been Rejected');", true);
            //Response.Redirect("ApproverDashboard.aspx");//Redirecting to Dashboard After Action Done
        }
        else if (ActionDropDown.SelectedValue == "Forward to Next Level")
        {
            DateTime      CPdate   = DateTime.Now;
            SqlDataReader myReader = null;
            //Label3.Text = "UnAuthorized Employee";
            // string Remarks = Request.Form["TextArea1"];

            //Start ... Code for find from Approver Action level and To Approver Action level while forwarding claim//
            if (Session["SessionEmployeeID"].ToString() == "SNPL-HYD-2048")
            {
                //Appname = "V S N Murthy";
                Appid     = "SNPL-HYD-2016";
                fromlevel = "Level 1";
                tolevel   = "Level 2";
            }
            else if (Session["SessionEmployeeID"].ToString() == "SNPL-HYD-2016")
            {
                //Appname = "B V Chowdary";
                Appid     = "SNPL-HYD-1107";
                fromlevel = "Level 2";
                tolevel   = "Level 3";
            }

            //End ... Code for find from Approver Action level and To Approver Action level while forwarding claim//

            SqlCommand myCommand = new SqlCommand("update ERSClaim set ERSClaimProcessDate=@var1 ,ERSClaimStatus=@var2 ,ERSClaimApproverRemarks=@var3,ERSApproverID=@var4 where ERSClaimID='" + claimId.Text + "'", con1);
            myCommand.Parameters.AddWithValue("@var1", date);
            myCommand.Parameters.AddWithValue("@var2", "Pending");
            myCommand.Parameters.AddWithValue("@var3", remarks.Text);
            myCommand.Parameters.AddWithValue("@var4", Appid);
            //myCommand.Parameters.AddWithValue("@var5", Appname);
            myReader = myCommand.ExecuteReader();
            //Triggering a Mail to Employee Regarding Claim Status
            string subject = "ERS-Claim Request Process Acknowledgement";
            string body    = "Dear \t" + " " + ename + ",<br /><br />\n\n Your Claim request with the following details has been Forwarded by Approver\n\n<br /><br /> Claim ID:\t" + claimid
                             + "\n<br />Date: " + Date + "\n<br />Type: " + Type +
                             "\n<br />Description: " + Description + "\n<br />Amount: " + BillAmount + "\n<br />Status: \t" + ActionDropDown.SelectedValue + "\n\n" + "\n<br />Approver Remarks: \t" + remarks.Text +
                             "\n<br />Process Date: \t" + CPdate + "\n <br />Approver ID: \t" + Approverid +
                             "<br /><br />Please click here to  <a href=\"http://192.168.0.105/Login.aspx\">login</a>" +
                             "\n\n\n<br /><br />Thanks & Regards\n<br />ERS Team<br />\nSNPL";
            sendMailToEmployee(subject, body, mailid);
            ActionDropDown.ClearSelection();
            remarks.Text = " ";
            alertmodal.Style.Add("background-color", "#d7ecc6");
            Alert.Style.Add("background-color", "#d7ecc6");
            Label7.ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
            Label9.ForeColor = System.Drawing.ColorTranslator.FromHtml("black");
            //Label3.Text = "Success!";
            //Label5.Text = "Employee has been Deleted";
            //alert.Visible = true;
            Label7.Text   = "Success!";
            Label9.Text   = "Claim has been forwarded to next level";
            Alert.Visible = true;
            grid();
            // ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Claim has been farwoded to next level');", true);
            //Response.Redirect("ApproverDashboard.aspx");//Redirecting to Dashboard After Action Done
        }
        else
        {
            //alertmod.Style.Add("background-color", "#ee7600");
            //Label1.ForeColor = System.Drawing.Color.White;
            //Label5.ForeColor = System.Drawing.Color.White;
            //fai.Visible = true;
            //Label2.Text = "Failure!";
            //Label5.Text = "Please select Action type";
            //alert.Visible = true;
            grid();
            //ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Please select Action type');", true);
            claimId.Focus();
        }
        con1.Close();
        BindGrid();
    }
Ejemplo n.º 4
0
    protected void Submit_Click(object sender, EventArgs e)
    {
        DateTime ProcessDate;
        DateTime AdvancePayCompletedDate;
        string   Advanceemployeeid;
        //Update Code Write Here

        SqlConnection con1 = new SqlConnection(constring);
        DataTable     dt   = new DataTable();

        con1.Open();
        DateTime date = DateTime.Today;

        date = Convert.ToDateTime(date.ToShortDateString());
        //Fetching Claim Details from ERSClaim Table based on AdvanceID for Mail Triggering
        int            i   = 0;
        DataTable      dt3 = new DataTable();
        DataRow        dr3;
        SqlDataAdapter da3 = new SqlDataAdapter("Select ERSAdvanceReason,ERSGrossPay,ERSAdvanceAmount,ERSApproverName,ERSApproverMailID,ERSAdvanceRequestProcessDate,ERSAdvanceApproverRemarks,ERSApplyDate,ERSAdavanceRequestStatus,ERSApproverID,ERSEmployeeID from ERSAdvancePay where ERSApproverID='" + Session["SessionEmployeeID"].ToString() + "'and ERSAdvanceID='" + AdvanceID.Text + "'", con1);

        da3.Fill(dt3);
        if (dt3.Rows.Count > 0)
        {
            dr3 = dt3.Rows[i];
            string Advanceid  = AdvanceID.Text;
            string reason     = Convert.ToString(dr3[0]);
            string grosspay   = Convert.ToString(dr3[1]);
            string Amount     = Convert.ToString(dr3[2]);
            string name       = Convert.ToString(dr3[3]);
            string mailiD     = Convert.ToString(dr3[4]);
            string remarks    = Convert.ToString(dr3[6]);
            string Applydate  = Convert.ToString(dr3[7]);
            string Status     = Convert.ToString(dr3[8]);
            string Approverid = Convert.ToString(dr3[9]);
            Advanceemployeeid = Convert.ToString(dr3[10]);

            string ename  = Session["SessionEmployeeName"].ToString();
            string mailid = Session["SessionUserMailID"].ToString();


            if (ActionDropDown.SelectedValue == "Approved")
            {
                // Action.Visible = false;
                ActionDropDown.Visible = false;
                SqlDataReader myReader = null;
                ProcessDate             = DateTime.Now;
                AdvancePayCompletedDate = ProcessDate.AddMonths(4);
                SqlCommand myCommand = new SqlCommand("update ERSAdvancePay set ERSAdavanceRequestStatus=@var2 ,ERSAdvanceApproverRemarks=@var3,AdvanceCompletedDate=@var5,AdvanceApproverActionDate=@var6 where ERSAdvanceID='" + AdvanceID.Text + "'", con1);

                myCommand.Parameters.AddWithValue("@var2", ActionDropDown.SelectedValue);
                myCommand.Parameters.AddWithValue("@var3", AdvanceRemarks.Text);
                myCommand.Parameters.AddWithValue("@var5", AdvancePayCompletedDate);
                myCommand.Parameters.AddWithValue("@var6", ProcessDate);
                //myCommand.Parameters.AddWithValue("@var4", "SNPL2048");
                myReader = myCommand.ExecuteReader();
                // Triggering a Mail to Employee Regarding Claim Status
                string subject = "ERS-Advance Pay Acknowledgement  Approved at <Level 1>";
                string body    = "Dear  " + " " + ename + ",<br /><br />Your Advance Pay request with the following details has been Approved by Approver<br /><br /> AdvancePayID: " + Advanceid
                                 + "<br />Claim Date: " + Applydate +
                                 "<br />Claim Reason: " + reason + "<br />Claim Amount: " + Amount + "<br /><br />Claim Status: \tApproved<br /><br /> " + "Approver Remarks: " + AdvanceRemarks.Text +
                                 "<br />Process Date: " + ProcessDate + "<br /> Approver: " + name +
                                 "<br />Please click here to  <a href=\"http://192.168.0.105/Login.aspx\">login</a>" +
                                 "<br /><br /><br />Thanks And Regards<br />ERS Team<br /><br />SNPL";
                sendMailToEmployee(subject, body, mailid);
                alertmodal.Style.Add("background-color", "#d7ecc6");
                Alert.Style.Add("background-color", "#d7ecc6");
                Label1.ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
                Label6.ForeColor = System.Drawing.ColorTranslator.FromHtml("black");

                Label6.Text   = "Advancepay has been approved";
                Label1.Text   = "Success!";
                Alert.Visible = true;
                grid();
                // ClientScript.RegisterStartupScript(GetType(), "Alert", "Alert(' Advancepay has been approved');", true);
            }

            else if (ActionDropDown.SelectedValue == "Rejected")
            {
                //Action.Visible = false;
                ActionDropDown.Visible = false;

                SqlDataReader myReader = null;
                ProcessDate             = DateTime.Now;
                AdvancePayCompletedDate = ProcessDate.AddMonths(4);

                //string Remarks = Request.Form["TextArea1"];
                //Label3.Text = "UnAuthorized Employee";
                SqlCommand myCommand = new SqlCommand("update ERSAdvancePay set ERSAdvanceRequestProcessDate=@var1 ,ERSAdavanceRequestStatus=@var2 ,ERSAdvanceApproverRemarks=@var3 where ERSAdvanceID='" + AdvanceID.Text + "'", con1);
                myCommand.Parameters.AddWithValue("@var1", ProcessDate);
                myCommand.Parameters.AddWithValue("@var2", ActionDropDown.SelectedValue);
                myCommand.Parameters.AddWithValue("@var3", AdvanceRemarks.Text);
                // myCommand.Parameters.AddWithValue("@var4", "SNPL2048");

                myReader = myCommand.ExecuteReader();
                //Triggering a Mail to Employee Regarding Claim Status
                // Triggering a Mail to Employee Regarding Claim Status
                string subject = "ERS-Advance Pay Acknowledgement Rejected at <Level 1>";
                string body    = "Dear  " + " " + ename + ",<br /><br /> Your Claim request with the following details has been Rejected by Approver<br /><br /> Claim ID: " + Advanceid
                                 + "<br />Apply Date:" + Applydate +
                                 "<br />Claim Reason:" + reason + "<br />Claim Amount: <br />" + Amount + "\n<br />Claim Status: \tRejected\n\n<br /><br /> " + "Approver Remarks:" + AdvanceRemarks.Text +
                                 "\n<br />Process Date:" + ProcessDate + "\n<br /> Approver: " + name +
                                 "<br />Please click here to  <a href=\"http://192.168.0.105/Login.aspx\">login</a>" +
                                 "<br /><br />Thanks And Regards\n<br />ERS Team\n<br />SNPL";
                sendMailToEmployee(subject, body, mailid);
                alertmodal.Style.Add("background-color", "#d7ecc6");
                Alert.Style.Add("background-color", "#d7ecc6");
                Label1.ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
                Label6.ForeColor = System.Drawing.ColorTranslator.FromHtml("black");

                Label1.Text   = "Success!";
                Label6.Text   = "Advancepay has been rejected";
                Alert.Visible = true;
                grid();
                // ClientScript.RegisterStartupScript(GetType(), "Alert", "Alert('Advancepay has been rejected.');", true);
            }
            else if (ActionDropDown.SelectedValue == "Forward to Next Level")
            {
                SqlDataReader myReader = null;
                ProcessDate             = DateTime.Now;
                AdvancePayCompletedDate = ProcessDate.AddMonths(4);


                //Start ... Code for find from Approver Action level and To Approver Action level while forwarding claim//
                if (Session["SessionEmployeeID"].ToString() == "SNPL-HYD-2048")
                {
                    Appname   = "V S N Murthy";
                    Appid     = "SNPL-HYD-2016";
                    fromlevel = "Level 1";
                    tolevel   = "Level 2";
                }
                else if (Session["SessionEmployeeID"].ToString() == "SNPL-HYD-2016")
                {
                    Appname   = "B V Chowdary";
                    Appid     = "SNPL-HYD-1107";
                    fromlevel = "Level 2";
                    tolevel   = "Level 3";
                }

                //End ... Code for find from Approver Action level and To Approver Action level while forwarding claim//


                //Label3.Text = "UnAuthorized Employee";
                // string Remarks = Request.Form["TextArea1"];
                SqlCommand myCommand = new SqlCommand("update ERSAdvancePay set ERSAdvanceRequestProcessDate=@var1 ,ERSAdavanceRequestStatus=@var2 ,ERSAdvanceApproverRemarks=@var3,ERSApproverID=@var4,ERSApproverName=@var5 where ERSAdvanceID='" + AdvanceID.Text + "'", con1);
                myCommand.Parameters.AddWithValue("@var1", ProcessDate);
                myCommand.Parameters.AddWithValue("@var2", "Pending");
                myCommand.Parameters.AddWithValue("@var3", AdvanceRemarks.Text);
                myCommand.Parameters.AddWithValue("@var4", Appid);
                myCommand.Parameters.AddWithValue("@var5", Appname);
                myReader = myCommand.ExecuteReader();
                //Triggering a Mail to Employee Regarding Claim Status
                string subject = "ERS-Advance Pay Acknowledgement Forwarded from <Level 1> To <Level 2>";
                string body    = "Dear  " + " " + ename + ",\n\n<br /><br /> Your Claim request with the following details has been forwarded by Approver<br /><br />\n\n Claim ID" + Advanceid
                                 + "<br />Claim Date:" + Applydate +
                                 "<br />Claim Reason:" + reason + "<br />Claim Amount: " + Amount + "<br />Claim Status :\tForwarded To Next Level<br /> " + "<br />Approver Remarks: " + AdvanceRemarks.Text +
                                 "<br />Process Date: " + ProcessDate + "<br /> Approver ID: " + name +
                                 "<br />Please click here to  <a href=\"http://192.168.0.105/Login.aspx\">login</a>" +
                                 "<br /><br /><br />Thanks & Regards<br />ERS Team<br />SNPL";
                sendMailToEmployee(subject, body, mailid);
                alertmodal.Style.Add("background-color", "#d7ecc6");
                Alert.Style.Add("background-color", "#d7ecc6");
                Label1.ForeColor = System.Drawing.ColorTranslator.FromHtml("green");
                Label6.ForeColor = System.Drawing.ColorTranslator.FromHtml("black");

                Label1.Text   = "Success!";
                Label6.Text   = "Advancepay has been Forwarded to next level of approver.";
                Alert.Visible = true;
                grid();
                // ClientScript.RegisterStartupScript(GetType(), "Alert", "Alert('Advancepay has been Forwarded to next level of approver.');", true);
            }
            AdvanceRemarks.Text = string.Empty;
            ActionDropDown.ClearSelection();
            con1.Close();
            BindGrid();
        }
        else
        {
        }
    }