Example #1
0
        public BacsExportService()
        {
            IConfiguration Configuration = new ConfigurationBuilder()
                                           .AddJsonFile(APP_SETTINGS_PATH)
                                           .Build();

            var documentStoreConfig = new DocumentStoreConfiguration();

            agencyPaymentsConfiguration = new AgencyPaymentsConfiguration();
            Configuration
            .GetSection(DOCUMENT_STORE_KEY)
            .Bind(documentStoreConfig);
            Configuration
            .GetSection(AGENCY_PAYMENTS_KEY)
            .Bind(agencyPaymentsConfiguration);

            documentStore = new DocumentStore
            {
                Urls     = new[] { documentStoreConfig.Url },
                Database = documentStoreConfig.Database
            };

            documentStore.Initialize();

            agencyPaymentService   = new AgencyPaymentService(documentStore);
            supplierPaymentService = new SupplierPaymentService();
        }
 public SupplierPaymentMainViewModel(ISupplierPaymentService supplierPaymentService, IEventAggregator eventAggregator)
 {
     SupplierPaymentRequest = new InteractionRequest <SupplierPaymentConfirmation>();
     DateFrom = DateTime.Now.AddDays(-DateTime.Now.Day + 1);
     DateTo   = DateTime.Now.AddMonths(1).AddDays(-DateTime.Now.Day);
     _supplierPaymentService = supplierPaymentService;
     eventAggregator.GetEvent <SupplierSelected>().Subscribe(OnSupplierSelected);
 }
Example #3
0
        public BacsExportService(IDocumentStore documentStore, IAgencyPaymentsConfiguration agencyPaymentsConfiguration)
        {
            this.agencyPaymentsConfiguration = agencyPaymentsConfiguration;
            this.documentStore     = documentStore;
            agencyPaymentService   = new AgencyPaymentService(documentStore);
            supplierPaymentService = new SupplierPaymentService();

            documentStore.Initialize();
        }