Exemple #1
0
 public IHttpActionResult GetInitData()
 {
     BLL.QuotationOverviewRpt bll = new BLL.QuotationOverviewRpt();
     Library.DTO.Notification notification;
     DTO.QuotationOverviewRpt.InitFormData data = bll.GetInitData(ControllerContext.GetAuthUserId(), out notification);
     return(Ok(new Library.DTO.ReturnData <DTO.QuotationOverviewRpt.InitFormData>()
     {
         Data = data, Message = notification, TotalRows = 0
     }));
 }
Exemple #2
0
        public DTO.QuotationOverviewRpt.InitFormData GetInitData(out Library.DTO.Notification notification)
        {
            notification = new Library.DTO.Notification()
            {
                Type = Library.DTO.NotificationType.Success
            };
            DTO.QuotationOverviewRpt.InitFormData data = new DTO.QuotationOverviewRpt.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);
        }