public ActionResult _SearchEventsAsAdmin(string searchTerm, int pageSize, int pageNum) { var events = EventServices.SearchEvents(searchTerm.Trim(), pageSize, pageNum, null, null, null); var pagedEvents = EventsToSelect2Format(events, pageSize); return(new JsonResult { Data = pagedEvents, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public ActionResult _SearchEvents(string searchTerm, int pageSize, int pageNum) { var events = EventServices.SearchEvents(searchTerm.Trim(), pageSize, pageNum, CurrentCedUser.CurrentUser.Email, Constants.ValidEventTypesForCed, WebConfigHelper.MinFinancialYear); var pagedEvents = EventsToSelect2Format(events, pageSize); return(new JsonResult { Data = pagedEvents, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }