Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Expence_Transaction expence_Transaction = db.Expence_Transactions.Find(id);

            db.Expence_Transactions.Remove(expence_Transaction);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "transaction_id,transac_bank_acc_id,transaction_amount,purpose_note,purpose_date")] Expence_Transaction expence_Transaction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expence_Transaction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.transac_bank_acc_id = new SelectList(db.Bank_Accounts, "bank_account_id", "bank_name", expence_Transaction.transac_bank_acc_id);
     return(View(expence_Transaction));
 }
Exemplo n.º 3
0
        // GET: Expence_Transaction/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Expence_Transaction expence_Transaction = db.Expence_Transactions.Find(id);

            if (expence_Transaction == null)
            {
                return(HttpNotFound());
            }
            return(View(expence_Transaction));
        }
Exemplo n.º 4
0
        // GET: Expence_Transaction/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Expence_Transaction expence_Transaction = db.Expence_Transactions.Find(id);

            if (expence_Transaction == null)
            {
                return(HttpNotFound());
            }
            ViewBag.transac_bank_acc_id = new SelectList(db.Bank_Accounts, "bank_account_id", "bank_name", expence_Transaction.transac_bank_acc_id);
            return(View(expence_Transaction));
        }