public void PutCustomerAccounts(int customeraccountsid, CustomerAccounts customerAccountstoUpdate) { //customerAccounts.UpdateData(customerAccountstoUpdate); ICustomerAccountsDb customerAccountsDb = new CustomerAccountsDb(); customerAccountsDb.RetrieveById(customeraccountsid); customerAccountsDb.UpdateData(customerAccountstoUpdate); }
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); }
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); } }
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); } }