public ActionResult DeleteConfirmed(string id) { MemberReivew memberReivew = db.MemberReivews.Find(id); db.MemberReivews.Remove(memberReivew); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ReviewID,CustomerID,PrdouctID,SuggesstionText")] MemberReivew memberReivew) { if (ModelState.IsValid) { db.Entry(memberReivew).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CustomerID = new SelectList(db.AspNetUsers, "Id", "Email", memberReivew.CustomerID); ViewBag.PrdouctID = new SelectList(db.BeautyProducts, "ProductID", "ProductName", memberReivew.PrdouctID); return(View(memberReivew)); }
// GET: MemberReivews/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MemberReivew memberReivew = db.MemberReivews.Find(id); if (memberReivew == null) { return(HttpNotFound()); } return(View(memberReivew)); }
// GET: MemberReivews/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MemberReivew memberReivew = db.MemberReivews.Find(id); if (memberReivew == null) { return(HttpNotFound()); } ViewBag.CustomerID = new SelectList(db.AspNetUsers, "Id", "Email", memberReivew.CustomerID); ViewBag.PrdouctID = new SelectList(db.BeautyProducts, "ProductID", "ProductName", memberReivew.PrdouctID); return(View(memberReivew)); }