コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            KiralamaBilgi kiralamaBilgi = db.KiralamaBilgi.Find(id);

            db.KiralamaBilgi.Remove(kiralamaBilgi);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }
コード例 #4
0
        // 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));
        }