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

            db.AccoutingBook.Remove(accoutingBook);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Id_Area,Name,Description")] AccoutingBook accoutingBook)
 {
     if (ModelState.IsValid)
     {
         db.Entry(accoutingBook).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id_Area = new SelectList(db.Area, "Id", "Name", accoutingBook.Id_Area);
     return(View(accoutingBook));
 }
        // GET: AccoutingBooks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AccoutingBook accoutingBook = db.AccoutingBook.Find(id);

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

            if (accoutingBook == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id_Area = new SelectList(db.Area, "Id", "Name", accoutingBook.Id_Area);
            return(View(accoutingBook));
        }