Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            autoShops autoShops = db.autoShops.Find(id);

            db.autoShops.Remove(autoShops);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "id,name,photos,txet,address")] autoShops autoShops)
 {
     if (ModelState.IsValid)
     {
         db.Entry(autoShops).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(autoShops));
 }
Exemple #3
0
        public ActionResult Create([Bind(Include = "id,name,photos,txet,address")] autoShops autoShops)
        {
            if (ModelState.IsValid)
            {
                db.autoShops.Add(autoShops);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(autoShops));
        }
Exemple #4
0
        // GET: Cingo/AutoShops/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            autoShops autoShops = db.autoShops.Find(id);

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