public DTO.CushionColorMng.SearchFilterData GetFilterData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.CushionColorMng.SearchFilterData data = new DTO.CushionColorMng.SearchFilterData(); data.Seasons = new List <DTO.Support.Season>(); data.YesNoValues = new List <DTO.Support.YesNo>(); data.ProductGroups = new List <DTO.Support.ProductGroup>(); data.CushionTypes = new List <DTO.Support.CushionType>(); //try to get data try { data.Seasons = supportFactory.GetSeason().ToList(); data.YesNoValues = supportFactory.GetYesNo().ToList(); data.ProductGroups = supportFactory.GetProductGroup().ToList(); data.CushionTypes = supportFactory.GetCushionType().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }
public IHttpActionResult GetSearchSupportData() { BLL.CushionColorMng bll = new BLL.CushionColorMng(Helper.AuthHelper.GetCurrentUserFolder(ControllerContext)); Library.DTO.Notification notification; DTO.CushionColorMng.SearchFilterData data = bll.GetFilterData(out notification); return(Ok(new Library.DTO.ReturnData <DTO.CushionColorMng.SearchFilterData>() { Data = data, Message = notification, TotalRows = 0 })); }