public ActionResult DeleteConfirmed(int id) { KiralamaBilgi kiralamaBilgi = db.KiralamaBilgi.Find(id); db.KiralamaBilgi.Remove(kiralamaBilgi); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "KiralamaID,Ad,Soyad,Telefon,Email,VerilisTarihi,AlinisTarihi,VerilisKilometre,GidilenKilometre,AlinanUcret,Arac")] KiralamaBilgi kiralamaBilgi) { if (ModelState.IsValid) { db.Entry(kiralamaBilgi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Arac = new SelectList(db.Araba, "AracID", "AracMarka", kiralamaBilgi.Arac); ViewBag.Kullanici = new SelectList(db.Kullanici, "KullaniciID", "Ad", kiralamaBilgi.Kullanici); return(View(kiralamaBilgi)); }
// GET: KiralamaBilgi/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } KiralamaBilgi kiralamaBilgi = db.KiralamaBilgi.Find(id); if (kiralamaBilgi == null) { return(HttpNotFound()); } return(View(kiralamaBilgi)); }
// GET: KiralamaBilgi/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } KiralamaBilgi kiralamaBilgi = db.KiralamaBilgi.Find(id); if (kiralamaBilgi == null) { return(HttpNotFound()); } ViewBag.Arac = new SelectList(db.Araba, "AracID", "AracMarka", kiralamaBilgi.Arac); ViewBag.Kullanici = new SelectList(db.Kullanici, "KullaniciID", "Ad", kiralamaBilgi.Kullanici); return(View(kiralamaBilgi)); }