Exemplo n.º 1
0
        public DTO.SeatCushionMng.SearchFilterData GetFilterData(out Library.DTO.Notification notification)
        {
            notification = new Library.DTO.Notification()
            {
                Type = Library.DTO.NotificationType.Success
            };
            DTO.SeatCushionMng.SearchFilterData data = new DTO.SeatCushionMng.SearchFilterData();
            data.Seasons       = new List <DTO.Support.Season>();
            data.YesNoValues   = new List <DTO.Support.YesNo>();
            data.ProductGroups = new List <DTO.Support.ProductGroup>();

            //try to get data
            try
            {
                data.Seasons       = supportFactory.GetSeason().ToList();
                data.YesNoValues   = supportFactory.GetYesNo().ToList();
                data.ProductGroups = supportFactory.GetProductGroup().ToList();
            }
            catch (Exception ex)
            {
                notification.Type    = Library.DTO.NotificationType.Error;
                notification.Message = ex.Message;
            }

            return(data);
        }