public void PutCustomerAccounts(int customeraccountsid, CustomerAccounts customerAccountstoUpdate)
        {
            //customerAccounts.UpdateData(customerAccountstoUpdate);
            ICustomerAccountsDb customerAccountsDb = new CustomerAccountsDb();

            customerAccountsDb.RetrieveById(customeraccountsid);
            customerAccountsDb.UpdateData(customerAccountstoUpdate);
        }
Пример #2
0
        public double GetCustomerAccountWithdrawal(int customerAccountsid, double amount)
        {
            ICustomerAccountsDb customerAccountsDb = new CustomerAccountsDb();
            CustomerAccounts    customerAccounts   = customerAccountsDb.RetrieveById(customerAccountsid);

            if (customerAccounts.Balance >= amount)
            {
                customerAccounts.Balance = customerAccounts.Balance - amount;
            }
            return(customerAccounts.Balance);
        }
Пример #3
0
        public bool GetCustomerCurrentAccountBalanceConfirmed(int customerAccountsid, double amount)
        {
            ICurrentConfigDb      currentConfigDb    = new CurrentConfigDb();
            IList <CurrentConfig> currentConfig      = currentConfigDb.RetrieveAll();
            ICustomerAccountsDb   customerAccountsDb = new CustomerAccountsDb();
            CustomerAccounts      customerAccounts   = customerAccountsDb.RetrieveById(customerAccountsid);

            if ((customerAccounts.Balance < amount + currentConfig[0].minimumBalance + customerAccounts.CoTCharge))
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Пример #4
0
        public bool GetCustomerSavingsAccountBalanceConfirmed(int customerAccountsid, double amount)
        {
            ISavingsConfigDb      savingsConfigDb    = new SavingsConfigDb();
            IList <SavingsConfig> savingsConfig      = savingsConfigDb.RetrieveAll();
            ICustomerAccountsDb   customerAccountsDb = new CustomerAccountsDb();
            CustomerAccounts      customerAccounts   = customerAccountsDb.RetrieveById(customerAccountsid);

            if ((customerAccounts.Balance < amount + savingsConfig[0].minimumBalance))
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }