Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FormalBottom formalBottom = db.FormalBottoms.Find(id);

            db.FormalBottoms.Remove(formalBottom);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "FormalBottomID,FormalBottomName,FormalBottomPhoto,FormalBottomColor,FormalBottomSeason,FormalBottomOccasion,FormalBottomType")] FormalBottom formalBottom)
 {
     if (ModelState.IsValid)
     {
         formalBottom.FormalBottomPhoto = "~/Content/Images/TuxedoSlacks.jpg";
         formalBottom.FormalBottomType  = "Formal";
         db.Entry(formalBottom).State   = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(formalBottom));
 }
Пример #3
0
        // GET: FormalBottoms/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FormalBottom formalBottom = db.FormalBottoms.Find(id);

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