Esempio n. 1
0
 public IHttpActionResult GetInitData()
 {
     BLL.EurofarPriceOverviewRpt bll = new BLL.EurofarPriceOverviewRpt();
     Library.DTO.Notification    notification;
     DTO.EurofarPriceOverViewRpt.InitFormData data = bll.GetInitData(ControllerContext.GetAuthUserId(), out notification);
     return(Ok(new Library.DTO.ReturnData <DTO.EurofarPriceOverViewRpt.InitFormData>()
     {
         Data = data, Message = notification, TotalRows = 0
     }));
 }
Esempio n. 2
0
        public DTO.EurofarPriceOverViewRpt.InitFormData GetInitData(out Library.DTO.Notification notification)
        {
            notification = new Library.DTO.Notification()
            {
                Type = Library.DTO.NotificationType.Success
            };
            DTO.EurofarPriceOverViewRpt.InitFormData data = new DTO.EurofarPriceOverViewRpt.InitFormData();
            data.Seasons = new List <DTO.Support.Season>();

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

            return(data);
        }