示例#1
0
 /// <summary>
 /// Account constructor
 /// </summary>
 /// <param name="accountId">Account ID</param>
 /// <param name="name">Name</param>
 /// <param name="surname">Surname</param>
 public Account(int accountId, string name, string surname)
 {
     ID          = accountId;
     Name        = name;
     Surname     = surname;
     Cashs       = new List <Cash>();
     cashCreator = new CashCreator();
 }
示例#2
0
        /// <summary>
        /// Cash type changing
        /// </summary>
        /// <param name="cashId">Cash ID</param>
        /// <param name="cashType">Cash type</param>
        public void ChangeCashType(int cashId, CashType cashType)
        {
            CashCreator cashCreator = new CashCreator();
            Cash        cash        = FindCash(cashId);
            int         money       = cash.Amount;

            cash        = cashCreator.CreateCash(cash.ID, cash.Currency, cashType);
            cash.Amount = money;
        }