public BankAccount8(string name, int number, double amount) : this(name, number) { balance = amount; if (balance >= 100) { accountState = AccountStateEnum.Active; } }
public void ChangeState(int id, AccountStateEnum state) { using (var session = Dao.SessionFactory.OpenSession()) using (var tx = session.BeginTransaction()) { var acc = session.Get<AccountEntity>(id).State.Identity = (int)state; session.Save(acc); tx.Commit(); } }
public void ChangeState(int id, AccountStateEnum state) { using (var session = Dao.SessionFactory.OpenSession()) using (var tx = session.BeginTransaction()) { var acc = session.Get <AccountEntity>(id).State.Identity = (int)state; session.Save(acc); tx.Commit(); } }
private void SetAccountState() { if (balance >= 100) { accountState = AccountStateEnum.Active; } else { accountState = AccountStateEnum.Inadequate; } }
public BankAccount8() { accountState = AccountStateEnum.Inadequate; }
public AccountState(AccountStateEnum value) { Value = value; }