public ActionResult DeleteConfirmed(int id)
        {
            CommHeeMembers commHeeMembers = db.CommHeeMembers.Find(id);

            db.CommHeeMembers.Remove(commHeeMembers);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,CommitHeesid,Teacherid")] CommHeeMembers commHeeMembers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(commHeeMembers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CommitHeesid = new SelectList(db.CommitHees, "id", "comitname", commHeeMembers.CommitHeesid);
     ViewBag.Teacherid    = new SelectList(db.Teachers, "Id", "FullName", commHeeMembers.Teacherid);
     return(View(commHeeMembers));
 }
        // GET: CommHeeMembers/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CommHeeMembers commHeeMembers = db.CommHeeMembers.Find(id);

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

            if (commHeeMembers == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CommitHeesid = new SelectList(db.CommitHees, "id", "comitname", commHeeMembers.CommitHeesid);
            ViewBag.Teacherid    = new SelectList(db.Teachers, "Id", "FullName", commHeeMembers.Teacherid);
            return(View(commHeeMembers));
        }