public ActionResult DeleteConfirmed(int id) { OgrenciTestGroupBind ogrenciTestGroupBind = db.OgrenciTestGroupBinds.Find(id); db.OgrenciTestGroupBinds.Remove(ogrenciTestGroupBind); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,TestGroupId,OgrenciAvatarId")] OgrenciTestGroupBind ogrenciTestGroupBind) { if (ModelState.IsValid) { db.Entry(ogrenciTestGroupBind).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.OgrenciAvatarId = new SelectList(db.OgrenciAvatars, "Id", "OgrName", ogrenciTestGroupBind.OgrenciAvatarId); ViewBag.TestGroupId = new SelectList(db.TestGroups, "Id", "Name", ogrenciTestGroupBind.TestGroupId); return(View(ogrenciTestGroupBind)); }
// GET: OgrenciTestGroupBinds/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OgrenciTestGroupBind ogrenciTestGroupBind = db.OgrenciTestGroupBinds.Find(id); if (ogrenciTestGroupBind == null) { return(HttpNotFound()); } return(View(ogrenciTestGroupBind)); }
// GET: OgrenciTestGroupBinds/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OgrenciTestGroupBind ogrenciTestGroupBind = db.OgrenciTestGroupBinds.Find(id); if (ogrenciTestGroupBind == null) { return(HttpNotFound()); } ViewBag.OgrenciAvatarId = new SelectList(db.OgrenciAvatars, "Id", "OgrName", ogrenciTestGroupBind.OgrenciAvatarId); ViewBag.TestGroupId = new SelectList(db.TestGroups, "Id", "Name", ogrenciTestGroupBind.TestGroupId); return(View(ogrenciTestGroupBind)); }