public DTO.BookingMng.SearchFilterData GetSearchFilter(out Library.DTO.Notification notification) { DTO.BookingMng.SearchFilterData data = new DTO.BookingMng.SearchFilterData(); notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; data.Seasons = new List <DTO.Support.Season>(); try { data.Seasons = supportFactory.GetSeason().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; if (ex.InnerException != null && !string.IsNullOrEmpty(ex.InnerException.Message)) { notification.DetailMessage.Add(ex.InnerException.Message); } } return(data); }
public IHttpActionResult GetSearchFilter() { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.BookingMng bll = new BLL.BookingMng(); Library.DTO.Notification notification; DTO.BookingMng.SearchFilterData data = bll.GetSearchFilter(out notification); return(Ok(new Library.DTO.ReturnData <DTO.BookingMng.SearchFilterData>() { Data = data, Message = notification })); }