private async Task <DataSet> InitializeAsync() { ISupplierDataServices supplier = _dataServices.GetSupplierDataServices(); DataSet set = await supplier.GetAsyncAllSupplierSummary(); return(set); }
/// <summary> /// Reitinialize the sql executor and all the services provided by this interface with /// a new connection string. /// </summary> /// <param name="sqlExecutor">Executor to be used.</param> /// <param name="connectionValue">Connection value.</param> private void InitServices(ISqlExecutor sqlExecutor, string connectionValue = "") { if (!string.IsNullOrEmpty(connectionValue)) { sqlExecutor.ConnectionString = connectionValue; TestConnection(sqlExecutor, connectionValue); } _executor = sqlExecutor; _supplierDataServices = new SupplierDataAccessLayer(sqlExecutor); _helperDataServices = new HelperDataAccessLayer(sqlExecutor); _commissionAgentDataServices = new CommissionAgentAccessLayer(sqlExecutor); _vehicleDataServices = new VehiclesDataAccessLayer(sqlExecutor); _settingsDataService = new SettingsDataService(sqlExecutor); _clientDataServices = new ClientDataAccessLayer(sqlExecutor); _officeDataService = new OfficeDataService(sqlExecutor); _companyDataService = new CompanyDataServices(sqlExecutor); _contractDataService = new ContractDataServices(sqlExecutor); _invoiceDataService = new InvoiceDataServices(sqlExecutor); _bookingDataService = new BookingDataAccessLayer(sqlExecutor, null); _fareDataService = new FareDataServices(sqlExecutor); _reservationRequestDataService = new ReservationRequestDataAccessLayer(sqlExecutor); _budgetDataService = new BudgetDataAccessLayer(sqlExecutor); _bookingIncidentDataService = new BookingIncidentDataAccessLayer(sqlExecutor); _userDataService = new UserDataService(sqlExecutor); }
/// <summary> /// This execute the payload and notify the event manager /// </summary> /// <param name="services">Services to be used</param> /// <param name="manager">Manager to be notified</param> /// <param name="payLoad">Payload to execute.</param> public override void ExecutePayload(IDataServices services, IEventManager manager, ref DataPayLoad payLoad) { _dataServices = services.GetSupplierDataServices(); _payload = payLoad; EventManager = manager; DataServices = services; _initializationNotifier = NotifyTaskCompletion.Create <DataPayLoad>(HandleSaveOrUpdate(_payload), ExecutedPayloadHandler); }
public void SetUp() { _dataServices = null; try { _sqlExecutor = SetupSqlQueryExecutor(); _dataServices = new DataServiceImplementation(_sqlExecutor); _supplierDataServices = _dataServices.GetSupplierDataServices(); } catch (Exception e) { Assert.Fail(e.Message); } }
/// <summary> /// Reitinialize the sql executor and all the services provided by this interface with /// a new connection string. /// </summary> /// <param name="sqlExecutor">Executor to be used.</param> /// <param name="connectionValue">Connection value.</param> private void InitServices(ISqlExecutor sqlExecutor, string connectionValue = "") { if (!string.IsNullOrEmpty(connectionValue)) { sqlExecutor.ConnectionString = connectionValue; } _executor = sqlExecutor; _supplierDataServices = new SupplierDataAccessLayer(sqlExecutor); _helperDataServices = new HelperDataAccessLayer(sqlExecutor); _commissionAgentDataServices = new CommissionAgentAccessLayer(sqlExecutor); _vehicleDataServices = new VehiclesDataAccessLayer(sqlExecutor); _settingsDataService = new SettingsDataService(sqlExecutor); _clientDataServices = new ClientDataAccessLayer(sqlExecutor); _officeDataService = new OfficeDataService(sqlExecutor); _companyDataService = new CompanyDataServices(sqlExecutor); _contractDataService = new ContractDataServices(sqlExecutor); _invoiceDataService = new InvoiceDataServices(sqlExecutor); _assistDataService = new AssistDataService(this); }
public ProvidersControlViewModel(IConfigurationService configurationService, IUnityContainer container, IDataServices services, IRegionManager regionManager, IDialogService service, IEventManager eventManager) : base(configurationService, eventManager, services, null, service, regionManager) { _container = container; _regionManager = regionManager; _extendedSupplierDataTable = new DataTable(); _uniqueIdentifier = _uniqueIdentifier % Int64.MaxValue; _mailBoxName = PROVIDER_SUMMARY_VM; _supplierTaskEvent += OnNotifyIncrementalList <SupplierSummaryDto>; _supplierDataServices = DataServices.GetSupplierDataServices(); _gridSorter = new GridSorter <SupplierSummaryDto>(service, _supplierDataServices, DefaultPageSize); _gridSorter.OnInitPage += _gridSorter_OnInitPage; _gridSorter.OnNewPage += _gridSorter_OnNewPage; DefaultPageSize = 100; ViewModelUri = new Uri("karve://booking/viewmodel?id=" + Guid.ToString()); SortCommand = new DelegateCommand <object>(OnSortCommand); OpenItemCommand = new DelegateCommand <object>(OpenCurrentItem); InitViewModel(); ActiveSubSystem(); }