public ActionResult DeleteConfirmed(int id) { AdayOy adayOy = db.AdayOy.Find(id); db.AdayOy.Remove(adayOy); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AdayOyId,AdayId,UyeId,OyTuruId,Tarih,Saat")] AdayOy adayOy) { if (ModelState.IsValid) { db.Entry(adayOy).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AdayId = new SelectList(db.Aday, "AdayId", "Metin", adayOy.AdayId); ViewBag.OyTuruId = new SelectList(db.OyTuru, "OyTuruId", "OyTuruAdi", adayOy.OyTuruId); ViewBag.UyeId = new SelectList(db.Uye, "UyeId", "isim", adayOy.UyeId); return(View(adayOy)); }
// GET: AdayOy/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AdayOy adayOy = db.AdayOy.Find(id); if (adayOy == null) { return(HttpNotFound()); } return(View(adayOy)); }
// GET: AdayOy/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AdayOy adayOy = db.AdayOy.Find(id); if (adayOy == null) { return(HttpNotFound()); } ViewBag.AdayId = new SelectList(db.Aday, "AdayId", "Metin", adayOy.AdayId); ViewBag.OyTuruId = new SelectList(db.OyTuru, "OyTuruId", "OyTuruAdi", adayOy.OyTuruId); ViewBag.UyeId = new SelectList(db.Uye, "UyeId", "isim", adayOy.UyeId); return(View(adayOy)); }