public DTO.FactoryProformaInvoiceMng.InitFormData GetInitData(int userId, out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DTO.FactoryProformaInvoiceMng.InitFormData data = new DTO.FactoryProformaInvoiceMng.InitFormData(); data.Factories = new List <DTO.Support.Factory>(); data.Seasons = new List <DTO.Support.Season>(); try { data.Factories = supportFactory.GetAuthorizedFactories(userId).ToList(); data.Seasons = supportFactory.GetSeason().ToList(); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; } return(data); }