Пример #1
0
 public SavingServices(User pUser)
 {
     _user = pUser;
     _savingManager = new SavingManager(pUser);
     _savingEventManager = new SavingEventManager(pUser);
     _ePS = new EventProcessorServices(pUser);
 }
Пример #2
0
 public SavingManager(string pTestDB)
     : base(pTestDB)
 {
     _savingProductManager = new SavingProductManager(pTestDB);
     _savingEventManager = new SavingEventManager(pTestDB);
     _loanManager = new LoanManager(pTestDB);
     _user = new User();
 }
Пример #3
0
 public SavingServices(User pUser)
 {
     _user = pUser;
     _savingManager = new SavingManager(pUser);
     _savingEventManager = new SavingEventManager(pUser);
     _ePS = new EventProcessorServices(pUser);
     MefContainer.Current.Bind(this);
 }
Пример #4
0
 public SavingManager(User pUser)
     : base(pUser)
 {
     _savingProductManager = new SavingProductManager(pUser);
     _savingEventManager = new SavingEventManager(pUser);
     _loanManager = new LoanManager(pUser);
     _clientManager = new ClientManager(pUser, false, false);
     _user = pUser;
 }
Пример #5
0
        public EventProcessorServices(User pUser,string testDB)
        {
            _user = pUser;

            _eventManagement = new EventManager(testDB);
            _savingEventManagement = new SavingEventManager(testDB);
            _movementSetManagement = new AccountingTransactionManager(testDB);
            _loanManager = new LoanManager(testDB);
            _packageManager = new LoanProductManager(testDB);
            _clientManagement = new ClientManager(testDB);
            _accountingServices = new Accounting.AccountingServices(testDB);

            _InitializeEventProcessor();
        }
Пример #6
0
 public EventProcessorServices(SavingEventManager savingEventManagement, AccountingTransactionManager movementSetManagement, AccountManager accountManager)
 {
     _savingEventManagement = savingEventManagement;
     _movementSetManagement = movementSetManagement;
     _InitializeEventProcessor();
 }
Пример #7
0
        protected override void SetUp()
        {
            base.SetUp();

            _productManager = (SavingProductManager)container["SavingProductManager"];
            _savingManager = (SavingManager)container["SavingManager"];
            _savingEventManager = (SavingEventManager)container["SavingEventManager"];

            Assert.IsNotNull(_savingManager);
            Assert.IsNotNull(_productManager);

            _savingsBookProduct = _productManager.SelectSavingsBookProduct(1);

            Assert.IsNotNull(_savingsBookProduct);

            User.CurrentUser.Id = 1;
        }
Пример #8
0
        public LoanServices(User pUser)
            : base(pUser)
        {
            _user = pUser;
            _loanManager = new LoanManager(pUser);
            _instalmentManager = new InstallmentManager(pUser);
            _clientManager = new ClientManager(pUser, true, true);
            _branchService = new BranchService(pUser);
            _econimcActivityServices = new EconomicActivityServices(pUser);
            _ePs = ServicesProvider.GetInstance().GetEventProcessorServices();
            _accountingServices = new AccountingServices(pUser);
            _fundingLineServices = new FundingLineServices(pUser);
            _savingServices = new SavingServices(pUser);
            _savingEventManager = new SavingEventManager(pUser);

            var settings = ApplicationSettings.GetInstance(string.Empty);
            var nonWorkingDate = NonWorkingDateSingleton.GetInstance(string.Empty);
            _configurationFactory = new OctopusScheduleConfigurationFactory(nonWorkingDate, settings);

            MefContainer.Current.Bind(this);
        }
Пример #9
0
        public void InitManager()
        {
            TechnicalSettings.CheckSettings();

            LoanProductManager loanProductManager = new LoanProductManager(DataUtil.TESTDB);
            AccountingTransactionManager accountingTransactionManager = new AccountingTransactionManager(DataUtil.TESTDB);
            EventManager eventManager = new EventManager(DataUtil.TESTDB);
            ExchangeRateManager exchangeRateManager = new ExchangeRateManager(DataUtil.TESTDB);
            ProvisioningRuleManager provisioningRuleManager = new ProvisioningRuleManager(DataUtil.TESTDB);
            AccountManager accountManager = new AccountManager(DataUtil.TESTDB);
            InstallmentTypeManager installmentTypeManager = new InstallmentTypeManager(DataUtil.TESTDB);
            UserManager userManager = new UserManager(DataUtil.TESTDB);
            EconomicActivityManager economicActivityManager = new EconomicActivityManager(DataUtil.TESTDB);
            InstallmentManager installmentManager = new InstallmentManager(DataUtil.TESTDB);
            FundingLineManager fundingLineManager = new FundingLineManager(DataUtil.TESTDB);
            ClientManager clientManager = new ClientManager(DataUtil.TESTDB);
            LocationsManager locationsManager = new LocationsManager(DataUtil.TESTDB);
            LoanManager loanManager = new LoanManager(DataUtil.TESTDB);
            ProjectManager projectManager = new ProjectManager(DataUtil.TESTDB);
            MFIManager mfiManager = new MFIManager(DataUtil.TESTDB);
            SavingManager savingManager = new SavingManager(DataUtil.TESTDB);
            SavingProductManager savingProductManager = new SavingProductManager(DataUtil.TESTDB);
            SavingEventManager savingEventManager = new SavingEventManager(DataUtil.TESTDB);
            CurrencyManager currencyManager = new CurrencyManager(DataUtil.TESTDB);
            AccountingRuleManager accountingRuleManager = new AccountingRuleManager(DataUtil.TESTDB);
            FundingLineServices fundingLineServices = new FundingLineServices(DataUtil.TESTDB);

            container = new Hashtable
                            {
                                {"LoanProductManager", loanProductManager},
                                {"AccountingTransactionManager", accountingTransactionManager},
                                {"EventManager", eventManager},
                                {"ExchangeRateManager", exchangeRateManager},
                                {"ProvisioningRuleManager", provisioningRuleManager},
                                {"AccountManager", accountManager},
                                {"InstallmentTypeManager", installmentTypeManager},
                                {"UserManager", userManager},
                                {"FundingLineManager", fundingLineManager},
                                {"LoanManager", loanManager},
                                {"ClientManager", clientManager},
                                {"LocationsManager", locationsManager},
                                {"ProjectManager", projectManager},
                                {"EconomicActivityManager", economicActivityManager},
                                {"InstallmentManager", installmentManager},
                                {"MFIManager", mfiManager},
                                {"SavingManager", savingManager},
                                {"SavingProductManager", savingProductManager},
                                {"SavingEventManager", savingEventManager},
                                {"CurrencyManager", currencyManager},
                                {"FundingLineServices", fundingLineServices},
                                {"AccountingRuleManager", accountingRuleManager}
                            };
        }
Пример #10
0
 public SavingServices(string pTestDB, User pUser)
 {
     _user = pUser;
     _savingManager = new SavingManager(pTestDB);
     _savingEventManager = new SavingEventManager(pTestDB);
     _ePS = new EventProcessorServices(pUser, pTestDB);
 }
Пример #11
0
 public SavingServices(string pTestDB)
 {
     _savingManager = new SavingManager(pTestDB);
     _savingEventManager = new SavingEventManager(pTestDB);
 }
Пример #12
0
 public SavingServices(SavingManager pSavingManager, SavingEventManager pSavingEventManager, LoanManager pLoanManager, User pUser)
 {
     _user = pUser;
     _savingManager = pSavingManager;
     _savingEventManager = pSavingEventManager;
 }
Пример #13
0
        protected override void SetUp()
        {
            base.SetUp();

            ChartOfAccounts.SuppressAll();

            _savingManager = (SavingManager)container["SavingManager"];
            _savingEventManager = (SavingEventManager)container["SavingEventManager"];

            _client = new Person { Id = 6 };
            _user = new User { Id = 1 };
            User.CurrentUser = _user;
            _product = new SavingsBookProduct
            {
                Id = 1,
                Name = "SavingProduct1",
                InitialAmountMin = 100,
                InitialAmountMax = 500,
                BalanceMin = 0,
                BalanceMax = 1000,
                WithdrawingMin = 100,
                WithdrawingMax = 150,
                DepositMin = 200,
                DepositMax = 250,
                TransferMin = 100,
                TransferMax = 200,
                InterestRateMin = 0.2,
                InterestRateMax = 0.3,
                InterestBase = OSavingInterestBase.Daily,
                InterestFrequency = OSavingInterestFrequency.EndOfMonth,
                Currency = new Currency { Id = 1 },
                WithdrawFeesType = OSavingsFeesType.Flat,
                FlatWithdrawFees = 10,
                TransferFeesType = OSavingsFeesType.Rate,
                RateTransferFees = 0.1
            };

            _saving = new SavingBookContract(ApplicationSettings.GetInstance(""),  _user, new DateTime(2009, 01, 01), _product, null)
            {
                Code = "S/CR/2009/SAVIN-1/BAR-1",
                InterestRate = 0.2,
                FlatWithdrawFees = 10,
                RateTransferFees = 0.1
            };
            _saving.FirstDeposit(1000, new DateTime(2009, 01, 01), null, new User(), Teller.CurrentTeller);

            _savingTarget = _saving = new SavingBookContract(ApplicationSettings.GetInstance(""),  _user, new DateTime(2009, 01, 01), _product, null)
            {
                Code = "S/CR/2009/SAVIN-1/BAR-2",
                InterestRate = 0.2,
            };

            _saving.InitialAmount = 1000;
            _saving.EntryFees = 10;
            _saving.SavingsOfficer = _user;
            _saving.NumberOfPeriods = 0;
            _saving.Id = _savingManager.Add(_saving, _client);
            _savingTarget.Id = _savingManager.Add(_savingTarget, _client);

            Branch branch = new Branch {Id = 1, Name = "Default", Code = "Default"};
            _saving.Branch = branch;
            _savingTarget.Branch = branch;
        }
Пример #14
0
 public SavingServices(string pTestDB)
 {
     _savingManager = new SavingManager(pTestDB);
     _savingEventManager = new SavingEventManager(pTestDB);
     MefContainer.Current.Bind(this);
 }
Пример #15
0
 public SavingServices(SavingManager pSavingManager, SavingEventManager pSavingEventManager, LoanManager pLoanManager, User pUser)
 {
     _user = pUser;
     _savingManager = pSavingManager;
     _savingEventManager = pSavingEventManager;
     MefContainer.Current.Bind(this);
 }
Пример #16
0
 public LoanServices(User pUser)
     : base(pUser)
 {
     _user = pUser;
     _loanManager = new LoanManager(pUser);
     _instalmentManager = new InstallmentManager(pUser);
     _clientManager = new ClientManager(pUser, true, true);
     _branchService = new BranchService(pUser);
     _econimcActivityServices = new EconomicActivityServices(pUser);
     _ePs = ServicesProvider.GetInstance().GetEventProcessorServices();
     _accountingServices = new AccountingServices(pUser);
     _fundingLineServices = new FundingLineServices(pUser);
     _savingServices = new SavingServices(pUser);
     _savingEventManager = new SavingEventManager(pUser);
 }