Exemplo n.º 1
0
        public DTO.ReportRAPEU.SupportDataContainer GetSupportData(out Library.DTO.Notification notification)
        {
            notification = new Library.DTO.Notification()
            {
                Type = Library.DTO.NotificationType.Success
            };
            DAL.Support.DataFactory factory = new Support.DataFactory();

            //try to get data
            try
            {
                DTO.ReportRAPEU.SupportDataContainer dtoItem = new DTO.ReportRAPEU.SupportDataContainer();
                dtoItem.Seasons   = factory.GetSeason().ToList();
                dtoItem.Factories = factory.GetFactory().ToList();
                return(dtoItem);
            }
            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(new DTO.ReportRAPEU.SupportDataContainer());
            }
        }
 public IHttpActionResult GetFilters()
 {
     BLL.ReportRAPEU                      bll = new BLL.ReportRAPEU();
     Library.DTO.Notification             notification;
     DTO.ReportRAPEU.SupportDataContainer result = bll.GetFilters(out notification);
     return(Ok(new Library.DTO.ReturnData <DTO.ReportRAPEU.SupportDataContainer>()
     {
         Data = result, Message = notification, TotalRows = 0
     }));
 }