public ActionResult AjaxRecomendRejectCall(RecommendedRejects RR) { RejectList = RR.Action; RejectComments = RR.Comments; RejectActionSection = RR.ActionSection; BR_ID = Convert.ToInt16(Session["BirthRegister_ID"]); UserName = Session["U_Name"].ToString(); UserId = Convert.ToInt16(Session["U_ID"]); Bprocess = new BirthProcessAction(); InsertResult = Bprocess.AddRejectrecomendVerification(BR_ID, UserId, UserName, RejectActionSection, RejectList, RejectComments); if (InsertResult != "Approve" || InsertResult != "Clarification" || InsertResult != "RecommendRejection") { ViewBag.Message = Utility.Util.AltMsg("Verification has been done"); } string BR_IDstr = "_" + Session["BirthRegister_ID"].ToString(); if (RejectActionSection.Equals("Clarification")) { List <MailNotification> MailInfo = Bprocess.getMailInfo("Clarification", BR_IDstr.ToString()); for (int i = 0; i < MailInfo.Count; i++) { Utility.Util.INotificationService mailNotification = new Utility.Util.MailService ("*****@*****.**", MailInfo[i].Subject, MailInfo[i].MailAppNo); mailNotification.Notify(); } } else if (RejectActionSection.Contains("Rejection")) { List <MailNotification> MailInfo = Bprocess.getMailInfo("Rejection", BR_IDstr.ToString()); for (int i = 0; i < MailInfo.Count; i++) { Utility.Util.INotificationService mailNotification = new Utility.Util.MailService ("*****@*****.**", MailInfo[i].Subject, MailInfo[i].MailAppNo); mailNotification.Notify(); } } return(RedirectToAction("Dashboard", "DashBoard")); }