//Get public ActionResult Staff(int? CustomerID) { BLManageStaff manageStaffBL = new BLManageStaff(); tblCustomerDetails customer = manageStaffBL.GetStaff(CustomerID.Value); customer.RoleID = UserRole.Staff; ViewBag.TimeZones = LookUpData.GetTimeZone(); ViewBag.NOCCommunicationBy = LookUpData.GetNOCCommunicationBy(); if (Request.IsAjaxRequest()) return PartialView(customer); else return View(customer); }
//Get public ActionResult GetStaffUsers(jQueryDataTableParamModel param) { int totalRecords = 0; var sortColumnIndex = Convert.ToInt32(Request["iSortCol_0"]); var sortDirection = Request["sSortDir_0"]; // asc or desc BLManageStaff manageStaffBL = new BLManageStaff(); List<tblCustomerDetails> lstCustomerDetail = manageStaffBL.GetStaff(UserRole.Staff, param.iDisplayStart, param.iDisplayLength, sortColumnIndex, sortDirection, param.sSearch, ref totalRecords); var result = from c in lstCustomerDetail select new[] { c.CustomerName, c.EmailAddress, c.CustomerID.ToString() }; return Json(new { sEcho = param.sEcho, iTotalRecords = totalRecords, iTotalDisplayRecords = totalRecords, aaData = result }, JsonRequestBehavior.AllowGet); }