protected void ChangeIncharge(object sender, EventArgs e)
        {
            string link = string.Empty, body = string.Empty;

            dbContext = new JobRequestDBEntities();

            var a = dbContext.tblRequests.Where(x => x.JR_Code == jrcode).FirstOrDefault();

            if (a != null)
            {
                tblRequest tbldata = a as tblRequest;

                tbldata.Incharge_ID = incharge;

                dbContext.Entry(tbldata).State = EntityState.Modified;

                dbContext.SaveChanges();
            }

            link = Environment.NewLine + "http://" + HttpContext.Current.Request.Url.Authority + "/DirectAssessment.aspx";

            var asstr = (from data in dbContext.tblUsers
                         join inchargePerson in dbContext.tblInchargePersons on data.EmpID equals inchargePerson.EmpID
                         into UP
                         from inchargePerson in UP.DefaultIfEmpty()
                         where inchargePerson.Incharge_ID == rdoInCharge.SelectedValue && inchargePerson.IsAssesstor == true
                         select new
            {
                EmpID = data.EmpID,
                EmailAdd = data.EmailAdd,
                InchargeCode = inchargePerson.Incharge_ID,
                IsAssesstor = inchargePerson.IsAssesstor,
                IsNoter = inchargePerson.IsNoter
            }
                         ).ToList();

            foreach (DataRow dr in ConvertToDataTable(asstr).Rows)
            {
                Boolean ress;

                ress = SaveEmailLogs(link + "?EmpID=" + dr["EmpID"].ToString().Trim() + "&RCode=" + jrcode
                                     , "Assesstor", dr["EmailAdd"].ToString().Trim(), approverfullname_fnamefirst.ToString().Trim()
                                     , dr["EmpID"].ToString().Trim(), Session["RCode"].ToString().Trim());

                body = "Dear Sir/Ma'am," + "<br /><br />" + "Good Day!";

                body += "<br /><br />" + "I Have Prepared A Job Order Request For Your Assessment.";

                body += "<br /><br />" + "You may click the link below to redirect to main page. ";

                body += "<br /><br />" + link + "?EmpID=" + dr["EmpID"].ToString().Trim() + "&RCode=" + jrcode;

                body += "<br /><br />" + "Thank You.";

                body += "<br /><br />" + "Note: This is a system generated email. Please do not reply. Thank you";


                var rx = new Regex(@"(?<=\w)\w");

                var newString2 = rx.Replace(Session["FullName_FnameFirst"].ToString(), new MatchEvaluator(m => m.Value.ToLowerInvariant()));

                using (MailMessage mm = new MailMessage())
                {
                    string sub = "Online Job Order Request: Requesting For Approval";

                    mm.Subject = sub.ToUpper();

                    mm.Body = body;

                    var newString = rx.Replace(Session["FullName_FnameFirst"].ToString(), new MatchEvaluator(m => m.Value.ToLowerInvariant()));

                    mm.From = new MailAddress(ConfigurationManager.AppSettings["MailSenderEmailAddress"].ToString(),

                                              ConfigurationManager.AppSettings["MailSenderName"].ToString());

                    mm.To.Add(dr["EmailAdd"].ToString().Trim());

                    SmtpClient smtp = new SmtpClient();

                    smtp.Host = ConfigurationManager.AppSettings["MailServer"].ToString();

                    smtp.EnableSsl = true;

                    mm.IsBodyHtml = true;

                    NetworkCredential NetworkCred = new NetworkCredential(ConfigurationManager.AppSettings["MailSenderEmailAddress"].ToString(),
                                                                          ConfigurationManager.AppSettings["MailSenderEmailPassword"].ToString());

                    smtp.Credentials = NetworkCred;

                    smtp.Port = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPPort"]);

                    ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate,
                                                                                       X509Chain chain, SslPolicyErrors sslPolicyErrors)
                    { return(true); };
                    smtp.Send(mm);
                }
            }

            dbContext.SaveChanges();

            SendToRequestor_Transferred();

            Show("Record Successfully Transferred");

            divRecords.Visible = true;

            gridRecords.Rebind();
        }