コード例 #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            MemberReivew memberReivew = db.MemberReivews.Find(id);

            db.MemberReivews.Remove(memberReivew);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }
コード例 #4
0
        // 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));
        }