public ActionResult AllAccount() { TranzactionBussniessLayer tranzactionBussniessLayer = new TranzactionBussniessLayer(); List <Account> accounts = tranzactionBussniessLayer.Accounts.ToList(); return(View(accounts)); }
public ActionResult Edit(int Id) { TranzactionBussniessLayer tranzactionBussniessLayer = new TranzactionBussniessLayer(); Account account = tranzactionBussniessLayer.Accounts.Single(acc => acc.CardNumber == Id); return(View(account)); }
public ActionResult Create(int CardNumber, string Name, string CardType, int Cash, int BankId) { Account account = new Account(); account.CardNumber = CardNumber; account.Name = Name; account.CardType = CardType; account.Cash = Cash; account.BankId = BankId; TranzactionBussniessLayer tranzactionBussniessLayer = new TranzactionBussniessLayer(); tranzactionBussniessLayer.AddAccount(account); return(RedirectToAction("AllAccount")); }