Пример #1
0
        public DTO.ReportSalePerCountry.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.ReportSalePerCountry.SupportDataContainer dtoItem = new DTO.ReportSalePerCountry.SupportDataContainer();
                dtoItem.Seasons = factory.GetSeason().ToList();
                dtoItem.Salers  = factory.GetSaler().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.ReportSalePerCountry.SupportDataContainer());
            }
        }
 public IHttpActionResult GetFilters()
 {
     BLL.ReportSalePerCountry bll = new BLL.ReportSalePerCountry();
     Library.DTO.Notification notification;
     DTO.ReportSalePerCountry.SupportDataContainer result = bll.GetFilters(out notification);
     return(Ok(new Library.DTO.ReturnData <DTO.ReportSalePerCountry.SupportDataContainer>()
     {
         Data = result, Message = notification, TotalRows = 0
     }));
 }