public DTO.ImageGalleryMng.SearchFilterData GetFilterData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.ImageGalleryMng.SearchFilterData data = new DTO.ImageGalleryMng.SearchFilterData(); data.SeasonTypes = new List <DTO.Support.SeasonType>(); data.YesNos = new List <DTO.Support.YesNo>(); data.GalleryItemTypes = new List <DTO.Support.GalleryItemType>(); //try to get data try { data.SeasonTypes = supportFactory.GetSeasonType().ToList(); data.YesNos = supportFactory.GetYesNo().ToList(); data.GalleryItemTypes = supportFactory.GetGalleryItemType().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public IHttpActionResult GetSearchSupportData() { BLL.ImageGalleryMng bll = new BLL.ImageGalleryMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); Library.DTO.Notification notification; DTO.ImageGalleryMng.SearchFilterData data = bll.GetFilterData(out notification); return(Ok(new Library.DTO.ReturnData <DTO.ImageGalleryMng.SearchFilterData>() { Data = data, Message = notification, TotalRows = 0 })); }