Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FormalSho formalSho = db.FormalShoes.Find(id);

            db.FormalShoes.Remove(formalSho);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "FormalShoesID,FormalShoesName,FormalShoesPhoto,FormalShoesColor,FormalShoesSeason,FormalShoesOccasion,FormalShoesType")] FormalSho formalSho)
 {
     if (ModelState.IsValid)
     {
         formalSho.FormalShoesPhoto = "~/Content/Images/TuxedoShoes.jpg";
         formalSho.FormalShoesType  = "Formal";
         db.Entry(formalSho).State  = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(formalSho));
 }
Exemplo n.º 3
0
        // GET: FormalShoes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FormalSho formalSho = db.FormalShoes.Find(id);

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