public IHttpActionResult GetSearchFilterData() { BLL.PLCMng bll = new BLL.PLCMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); Library.DTO.Notification notification; DTO.PLCMng.SearchFilterData data = bll.GetFilterData(out notification); return(Ok(new Library.DTO.ReturnData <DTO.PLCMng.SearchFilterData>() { Data = data, Message = notification, TotalRows = 0 })); }
// // CUSTOM FUNCTION // public DTO.PLCMng.SearchFilterData GetFilterData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.PLCMng.SearchFilterData data = new DTO.PLCMng.SearchFilterData(); data.Seasons = new List <DTO.Support.Season>(); //try to get data try { data.Seasons = supportFactory.GetSeason().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }