public int CreateAccount(IAccountType accountType) { int accountNumber = getNextID(this.accountDB); this.accountDB.Add(accountNumber, accountType); return(accountNumber); }
public UnitOfWork(ApplicationDbContext context) { _context = context; cs = new EmailServiceRepository(); ct = new AccountRepository(context); cv = new AccountTypeRepository(context); }
public CommRuleGeneric(IModel ModelPortfolio, IAccountType AccountType, string CommRuleName, FeeTypes FeeType, Fees.Calculations.CommCalc CommCalculation) : base(CommRuleName, FeeType, CommCalculation) { this.ModelPortfolio = ModelPortfolio; this.AccountType = AccountType; }
/// <summary> /// Determines if account type is valid /// </summary> /// <param name="accountType">Given account type</param> /// <returns>True, if account type is valid</returns> internal static bool IsAccountTypeValid(IAccountType accountType) { if (accountType == null) { return(false); } return(true); }
public BankAccount(ulong newId, Person newOwner, IAccountType accType, double newBalance = 0) { id = newId; owner = newOwner; balance = newBalance; accountType = accType; bonuses = 0; }
/// <summary> /// Calculates bonus points /// </summary> /// <param name="accountType">Given account type</param> /// <param name="isDeposit">True if need to calculate for deposit, false if need to calculate for withdrawal</param> /// <returns>Calculated bonus points</returns> public int CalculateBonusPoints(IAccountType accountType, bool isDeposit) { if (isDeposit) { return(accountType.DepositCost); } else { return(accountType.BalanceCost / 2); } }
public CommRuleSpecific(OrderActionTypes actionType, bool applyToAllAccounts, IAccountType accountType, IModel modelPortfolio, IAccount account, IInstrument instrument, ISecCategory ruleSecCategory, IExchange exchange, string commRuleName, FeeTypes feeType, CommRuleOpenClose openClose, CommRuleBuySell buySell, Fees.Calculations.CommCalc commCalculation) : base(commRuleName, feeType, commCalculation) { this.actionType = actionType; this.ApplyToAllAccounts = applyToAllAccounts; this.AccountType = accountType; this.ModelPortfolio = modelPortfolio; this.Account = account; this.Instrument = instrument; this.RuleSecCategory = ruleSecCategory; this.Exchange = exchange; this.OpenClose = openClose; this.BuySell = buySell; }
public void GetAccType(IAccountType accountType) { accountType.AccType(); }
public PersonalAccount(Person accountOwnerIn, IAccountType accountTypeIn) { this.accountOwner = accountOwnerIn; this.accountType = accountTypeIn; }
public TPBank(IAccountType accountType) : base(accountType) { }
public Agribank(IAccountType accountType) : base(accountType) { }
/// <summary> /// Parametrized constructor /// </summary> /// <param name="id">Given id</param> /// <param name="firstName">Given first name</param> /// <param name="lastName">Given last name</param> /// <param name="balance">Given balance</param> /// <param name="bonusPoints">Given bonus points</param> /// <param name="accountType">Given account type</param> /// <param name="bonusPointsCalculator">Given bonus points calculator</param> public BankAccount(int id, string firstName, string lastName, decimal balance, int bonusPoints, IAccountType accountType, IBonusPointsCalculator bonusPointsCalculator) { this.Id = id; this.FirstName = firstName; this.LastName = lastName; this.Balance = balance; this.BonusPoints = bonusPoints; this.AccountType = accountType; this.BonusPointsCalculator = bonusPointsCalculator; }
public Bank(IAccountType accountType) { this.accountType = accountType; }