Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            LicenciaConducir licenciaConducir = db.LicenciaConducirs.Find(id);

            db.LicenciaConducirs.Remove(licenciaConducir);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "NumeroLicencia,Pais,Expedido,Caduca")] LicenciaConducir licenciaConducir)
 {
     if (ModelState.IsValid)
     {
         db.Entry(licenciaConducir).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(licenciaConducir));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "NumeroLicencia,Pais,Expedido,Caduca")] LicenciaConducir licenciaConducir)
        {
            if (ModelState.IsValid)
            {
                db.LicenciaConducirs.Add(licenciaConducir);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(licenciaConducir));
        }
Пример #4
0
        // GET: LicenciaConducirs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LicenciaConducir licenciaConducir = db.LicenciaConducirs.Find(id);

            if (licenciaConducir == null)
            {
                return(HttpNotFound());
            }
            return(View(licenciaConducir));
        }