public ActionResult DeleteConfirmed(int id)
        {
            tbl_income_category tbl_income_category = db.tbl_income_category.Find(id);

            db.tbl_income_category.Remove(tbl_income_category);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "category_id,category_name,user_id")] tbl_income_category tbl_income_category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_income_category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.user_id = new SelectList(db.tbl_user, "user_id", "user_name", tbl_income_category.user_id);
     return(View(tbl_income_category));
 }
        // GET: /Income_Category/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_income_category tbl_income_category = db.tbl_income_category.Find(id);

            if (tbl_income_category == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_income_category));
        }
        // GET: /Income_Category/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_income_category tbl_income_category = db.tbl_income_category.Find(id);

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