public ActionResult KeyListCreate(KeyList keyList)
        {
            if (ModelState.IsValid)
            {
                keyList.DistKey = GlobalVariables.DistKey;
                db.KeyList.Add(keyList);
                db.SaveChanges();
                return RedirectToAction("KeyListIndex");
            }

            return View(keyList);
        }
 public ActionResult KeyListEdit(KeyList keyList)
 {
     if (ModelState.IsValid)
     {
         db.Entry(keyList).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(keyList);
 }