Exemple #1
0
        public ActionResult AllAccount()
        {
            TranzactionBussniessLayer tranzactionBussniessLayer = new TranzactionBussniessLayer();
            List <Account>            accounts = tranzactionBussniessLayer.Accounts.ToList();

            return(View(accounts));
        }
Exemple #2
0
        public ActionResult Edit(int Id)
        {
            TranzactionBussniessLayer tranzactionBussniessLayer = new TranzactionBussniessLayer();
            Account account = tranzactionBussniessLayer.Accounts.Single(acc => acc.CardNumber == Id);

            return(View(account));
        }
Exemple #3
0
        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"));
        }