Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DressesTable dressesTable = db.DressesTables.Find(id);

            db.DressesTables.Remove(dressesTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "DressesID,DressesName,DressesPhoto,DressesType,DressesColor,DressesSeason,DressesOccasion")] DressesTable dressesTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dressesTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dressesTable));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "DressesID,DressesName,DressesPhoto,DressesType,DressesColor,DressesSeason,DressesOccasion")] DressesTable dressesTable)
        {
            if (ModelState.IsValid)
            {
                db.DressesTables.Add(dressesTable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dressesTable));
        }
Beispiel #4
0
        // GET: DressesTables/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DressesTable dressesTable = db.DressesTables.Find(id);

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