예제 #1
0
 /// <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);
 }
 public void SetUp()
 {
     _serviceConf = base.SetupConfigurationService();
     try
     {
         _sqlExecutor        = SetupSqlQueryExecutor();
         _dataServices       = new DataServiceImplementation(_sqlExecutor);
         _companyDataService = _dataServices.GetCompanyDataServices();
         //  _commissionAgentDataServices = _dataServices.GetCommissionAgentDataServices();
         //  Assert.NotNull(_commissionAgentDataServices);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 public override void ExecutePayload(IDataServices services, IEventManager manager, ref DataPayLoad payLoad)
 {
     _companyDataServices          = services.GetCompanyDataServices();
     ToolbarInitializationNotifier = NotifyTaskCompletion.Create <DataPayLoad>(HandleSaveOrUpdate(payLoad), ExecutedPayloadHandler);
 }