public JsonResult JsonCheckEmail(tblCustomerDetails input) { BLManageUser manageuserBL = new BLManageUser(); var result = manageuserBL.Emailexists(input.EmailAddress); if (result == 1) return Json( false,JsonRequestBehavior.AllowGet); return Json(true,JsonRequestBehavior.AllowGet); ; }
public ActionResult User(tblCustomerDetails customerdetail) { try { BLManageUser customerBL = new BLManageUser(); customerBL.SetUsers(customerdetail); SessionHelper.UserSession.Name = customerdetail.CustomerName; } catch { ModelState.AddModelError("", "Error occurred while updating profile update."); return Json(new { errors = KeyValue.GetErrorsFromModelState(ViewData) }); } UrlHelper u = new UrlHelper(HttpContext.Request.RequestContext); string url = u.Action("Index", "Search", null); return Json(new { success = true, redirect = url }); }
//Get private ActionResult GetUsers(int RoleID, jQueryDataTableParamModel param) { int totalRecords = 0; var sortColumnIndex = Convert.ToInt32(Request["iSortCol_0"]); var sortDirection = Request["sSortDir_0"]; // asc or desc BLManageUser manageUserBL = new BLManageUser(); List<tblCustomerDetails> lstCustomerDetail = manageUserBL.GetUsers(RoleID, param.iDisplayStart, param.iDisplayLength, sortColumnIndex, sortDirection, param.sSearch, ref totalRecords); var result = from c in lstCustomerDetail let TimeZoneName = c.TimeZone.Name let NOCCommunicationName = c.NOCCommunication.Name select new[] { c.CustomerName, c.EmailAddress, TimeZoneName, c.CustomerContactName, NOCCommunicationName, c.CustomerID.ToString() }; return Json(new { sEcho = param.sEcho, iTotalRecords = totalRecords, iTotalDisplayRecords = totalRecords, aaData = result }, JsonRequestBehavior.AllowGet); }
public ActionResult User(tblCustomerDetails customerdetail) { try { string submitButtonID = Request["SubmitButtonID"].ToString(); BLManageUser customerBL = new BLManageUser(); customerBL.SetUsers(customerdetail); if (submitButtonID == "SbmtEmail") Common.SendMail(customerdetail.EmailAddress, "Please login in flexis system with below credentials", "User Name: " + customerdetail.EmailAddress + ", " + "Password: "******"", "Error occurred durung Customer Information save."); return Json(new { errors = KeyValue.GetErrorsFromModelState(ViewData) }); } return Json(new { success = true, CustomerID = SessionHelper.UserSession.CustomerID, Tab = "CI" }); }