public ActionResult Create(DormExamType dormexamtype)
        {
            if (ModelState.IsValid)
            {
                Db.DormExamTypes.Add(dormexamtype);
                Db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(dormexamtype);
        }
 public ActionResult Edit(DormExamType dormexamtype)
 {
     if (ModelState.IsValid)
     {
         Db.Entry(dormexamtype).State = EntityState.Modified;
         Db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(dormexamtype);
 }
 public ActionResult GetDormExamTypeAndAll()
 {
     var all = new DormExamType()
     {
         Id = 0,
         Name = "全部",
         IsStop = 0
     };
     var list = Db.DormExamTypes.ToList();
     list.Insert(0, all);
     return Json(list);
 }