Example #1
0
 public ActionResult DeleteClothes(int id)
 {
     Models.Clothes clothes = db.Clothes.Find(id);
     db.Clothes.Remove(clothes);
     db.SaveChanges();
     return(RedirectPermanent("~/Clothes/GetClothes"));
 }
Example #2
0
 public ActionResult EditClothes(int id)
 {
     Models.Clothes clothes = db.Clothes.Find(id);
     return(View(clothes));
 }
Example #3
0
 public ActionResult NewClothes(Models.Clothes clothes)
 {
     db.Entry(clothes).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectPermanent("~/Clothes/GetClothes"));
 }
Example #4
0
 public ActionResult AddClothes(Models.Clothes clothes)
 {
     db.Clothes.Add(clothes);
     db.SaveChanges();
     return(RedirectPermanent("~/Clothes/GetClothes"));
 }