Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Expense_Information expense_Information = db.Expense_Information.Find(id);

            db.Expense_Information.Remove(expense_Information);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "category_Id,Category,Description")] Expense_Information expense_Information)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expense_Information).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(expense_Information));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "category_Id,Category,Description")] Expense_Information expense_Information)
        {
            if (ModelState.IsValid)
            {
                db.Expense_Information.Add(expense_Information);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(expense_Information));
        }
Esempio n. 4
0
        // GET: Expense_Information/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Expense_Information expense_Information = db.Expense_Information.Find(id);

            if (expense_Information == null)
            {
                return(HttpNotFound());
            }
            return(View(expense_Information));
        }