public ActionResult Create(DocIndex docindex)
        {
            if (ModelState.IsValid)
            {
                db.DocIndexes.Add(docindex);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(docindex);
        }
 public ActionResult Edit(DocIndex docindex)
 {
     if (ModelState.IsValid)
     {
         db.Entry(docindex).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(docindex);
 }