private void NewBankAccount(BankAccountFromTo fromto) { int id = this.bankAccountAgent.Add(); if (id > 0) { var fromBankAccountId = this.FromBankAccount.BankAccountId; var toBankAccountId = this.ToBankAccount.BankAccountId; LoadBankAccountList(); if (fromto == BankAccountFromTo.From) { this.FromBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == id); this.ToBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == toBankAccountId); } else { this.FromBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == fromBankAccountId); this.ToBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == id); } //base.Validate(); } }
private void NewBankAccount(BankAccountFromTo fromto) { int id = this.bankAccountAgent.Add(); if (id > 0) { var fromBankAccountId = this.FromBankAccount.BankAccountId; var toBankAccountId = this.ToBankAccount.BankAccountId; LoadBankAccountList(); if (fromto == BankAccountFromTo.From) { this.FromBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == id); this.ToBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == toBankAccountId); } else { this.FromBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == fromBankAccountId); this.ToBankAccount = this.BankAccounts.FirstOrDefault(a => a.BankAccountId == id); } //base.Validate(); } }