public void SelectFundingLines()
        {
            FundingLineServices service = (FundingLineServices)container["FundingLineServices"];
            List <FundingLine>  liste   = service.SelectFundingLines();

            Assert.IsTrue(liste.Count > 0);
        }
示例#2
0
        public void InitManager()
        {
            ApplicationSettings.GetInstance("").DeleteAllParameters();
            ApplicationSettings.GetInstance("").AddParameter(OGeneralSettings.CALCULATIONLATEFEESDURINGPUBLICHOLIDAYS, true);
            ApplicationSettings.GetInstance("").AddParameter(OGeneralSettings.ACCOUNTINGPROCESS, OAccountingProcesses.Cash);
            TechnicalSettings.UseOnlineMode = false;
            //Create Manager
            FundingLineManager fundingLineManager = new FundingLineManager(DataUtil.TESTDB);
            ClientManager      clientManagement   = new ClientManager(DataUtil.TESTDB);
            ConnectionManager  connectionManager  = ConnectionManager.GetInstance(DataUtil.TESTDB);
            //Create Service
            EconomicActivityServices economicActivityServices = new EconomicActivityServices(DataUtil.TESTDB);
            ClientServices           clientService            = new ClientServices(clientManagement);
            FundingLineServices      fundingLineService       = new FundingLineServices(fundingLineManager, clientManagement);
            ProjectServices          projectService           = new ProjectServices(DataUtil.TESTDB);

            container = new Hashtable
            {
                { "EconomicActivityServices", economicActivityServices },
                { "ClientServices", clientService },
                { "FundingLineServices", fundingLineService },
                { "ProjectServices", projectService },
                { "ConnectionManager", connectionManager }
            };
        }
 public VillageDisburseLoanForm(Village village)
 {
     _village           = village;
     _accumulatedAmount = 0;
     _notEnoughMoney    = false;
     _fLServices        = new FundingLineServices(User.CurrentUser);
     InitializeComponent();
     InitializeControls();
 }
示例#4
0
 public VillageAddLoanForm(Village village, LoanProduct product, NonSolidaryGroupForm nsgForm)
 {
     _village           = village;
     _product           = product;
     _nsgForm           = nsgForm;
     _product.EntryFees = ServicesProvider.GetInstance().GetProductServices().GetProductEntryFees(_product, village);
     _fLServices        = new FundingLineServices(User.CurrentUser);
     _accumulatedAmount = 0;
     InitializeComponent();
     InitializeControls();
 }
示例#5
0
        public FundingLine AddGenericFundingLineWithThreeEvents(DateTime startDate)
        {
            ChartOfAccounts _chartOfAccounts = ChartOfAccounts.GetInstance(new User {
                Id = 5
            });
            AccountManager accountManager = new AccountManager(new User {
                Id = 5
            });

            _chartOfAccounts.Accounts = accountManager.SelectAllAccounts();

            FundingLineServices service = new FundingLineServices(new User {
                Id = 5
            });
            int         newFL_ID           = AddGenericFundingLine4();
            FundingLine fundingLineInitial = service.SelectFundingLineById(newFL_ID, true);

            FundingLineEvent ev0 = new FundingLineEvent();

            ev0.Code         = "6012";
            ev0.CreationDate = startDate.AddDays(-2);
            ev0.Amount       = 1000;
            ev0.Movement     = OBookingDirections.Credit;
            ev0.Type         = OFundingLineEventTypes.Entry;
            ev0.FundingLine  = fundingLineInitial;
            ev0.IsDeleted    = false;

            fundingLineInitial.AddEvent(service.AddFundingLineEvent(ev0));

            FundingLineEvent ev1 = new FundingLineEvent();

            ev1.Code         = "6013";
            ev1.CreationDate = startDate.AddDays(-1);
            ev1.Amount       = 500;
            ev1.Movement     = OBookingDirections.Debit;
            ev1.Type         = OFundingLineEventTypes.Disbursment;
            ev1.FundingLine  = fundingLineInitial;
            ev1.IsDeleted    = false;
            fundingLineInitial.AddEvent(service.AddFundingLineEvent(ev1));

            FundingLineEvent ev2 = new FundingLineEvent();

            ev2.Code         = "6014";
            ev2.CreationDate = startDate;
            ev2.Amount       = 100;
            ev2.Movement     = OBookingDirections.Credit;
            ev2.Type         = OFundingLineEventTypes.Repay;
            ev2.FundingLine  = fundingLineInitial;
            ev2.IsDeleted    = false;

            fundingLineInitial.AddEvent(service.AddFundingLineEvent(ev2));

            return(fundingLineInitial);
        }
示例#6
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 }
            };
        }