//Get public ActionResult User() { BLCustomer customerBL = new BLCustomer(); tblCustomerDetails customer = customerBL.GetCustomer(SessionHelper.UserSession.CustomerID); ViewBag.TimeZones = LookUpData.GetTimeZoneCI(); ViewBag.NOCCommunicationBy = LookUpData.GetNOCCommunicationBy(); if (Request.IsAjaxRequest()) return PartialView( customer); else return View(customer); }
//Get public ActionResult Email(int CustomerID) { try { BLCustomer customerBL = new BLCustomer(); tblCustomerDetails customer = customerBL.GetCustomer(CustomerID); Common.SendMail(customer.EmailAddress, "Please login in flexis system with these credentials !", "User Name: " + customer.EmailAddress + "<br>" + "Password: "******"", "Error occurred durung Customer Information save."); return Json(new { errors = KeyValue.GetErrorsFromModelState(ViewData) }); } return Json(new { success = true, MessageDetail = "User's credentials successfully sent to his/her mail address." }, JsonRequestBehavior.AllowGet); }
// GET public ActionResult CustomerInformation(int? CustomerID) { BLCustomer customerBL = new BLCustomer(); tblCustomerDetails customer = customerBL.GetCustomer(CustomerID.Value); ViewBag.TimeZones = LookUpData.GetTimeZoneCI(); ViewBag.NOCCommunicationBy = LookUpData.GetNOCCommunicationBy(); if (Request.IsAjaxRequest()) return PartialView(customer); else return View(customer); }
//Get public ActionResult User(int? CustomerID, int? RoleID) { BLCustomer customerBL = new BLCustomer(); tblCustomerDetails customer = customerBL.GetCustomer(CustomerID.Value); if (CustomerID.HasValue && CustomerID.Value > 0) customer.RoleID = RoleID.HasValue ? RoleID.Value : 0; ViewBag.TimeZones = LookUpData.GetTimeZoneCI(); ViewBag.NOCCommunicationBy = LookUpData.GetNOCCommunicationBy(); if (Request.IsAjaxRequest()) return PartialView(customer); else return View(customer); }