Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbl_extra_account tbl_extra_account = db.tbl_extra_account.Find(id);

            db.tbl_extra_account.Remove(tbl_extra_account);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "income_id,payment_process,pay_order_ddno,incame_cetegory,date,year,amount,receiver_id,payment_discription,user_id,category_id")] tbl_extra_account tbl_extra_account)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_extra_account).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.category_id = new SelectList(db.tbl_income_category, "category_id", "category_name", tbl_extra_account.category_id);
     ViewBag.user_id     = new SelectList(db.tbl_user, "user_id", "user_name", tbl_extra_account.user_id);
     return(View(tbl_extra_account));
 }
Example #3
0
        // GET: /Extra_Account/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_extra_account tbl_extra_account = db.tbl_extra_account.Find(id);

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

            if (tbl_extra_account == null)
            {
                return(HttpNotFound());
            }
            ViewBag.category_id = new SelectList(db.tbl_income_category, "category_id", "category_name", tbl_extra_account.category_id);
            ViewBag.user_id     = new SelectList(db.tbl_user, "user_id", "user_name", tbl_extra_account.user_id);
            return(View(tbl_extra_account));
        }