Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            UsersTransaction usersTransaction = db.UsersTransactions.Find(id);

            db.UsersTransactions.Remove(usersTransaction);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "TransactionsId,FromAccount,ToAccount,Amount,CurrencyRate,TransactionData")] UsersTransaction usersTransaction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(usersTransaction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FromAccount = new SelectList(db.UsersBankAccounts, "AccountId", "AccountId", usersTransaction.FromAccount);
     ViewBag.ToAccount   = new SelectList(db.UsersBankAccounts, "AccountId", "AccountId", usersTransaction.ToAccount);
     return(View(usersTransaction));
 }
Exemple #3
0
        // GET: UsersTransactions/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UsersTransaction usersTransaction = db.UsersTransactions.Find(id);

            if (usersTransaction == null)
            {
                return(HttpNotFound());
            }
            return(View(usersTransaction));
        }
Exemple #4
0
        // GET: UsersTransactions/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UsersTransaction usersTransaction = db.UsersTransactions.Find(id);

            if (usersTransaction == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FromAccount = new SelectList(db.UsersBankAccounts, "AccountId", "AccountId", usersTransaction.FromAccount);
            ViewBag.ToAccount   = new SelectList(db.UsersBankAccounts, "AccountId", "AccountId", usersTransaction.ToAccount);
            return(View(usersTransaction));
        }