public ActionResult Edit([Bind(Include = "LocationID,Name")] Location location) { if (ModelState.IsValid) { db.Entry(location).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(location)); }
public ActionResult Edit([Bind(Include = "CategoryID,Name")] Category category) { if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Edit([Bind(Include = "ReviewerID,Name,DateJoined,ReviewerImage,ReviewerBio")] Reviewer reviewer) { if (ModelState.IsValid) { reviewer.DateJoined = DateTime.Today; db.Entry(reviewer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(reviewer)); }
public ActionResult Edit([Bind(Include = "ReviewID,Title,Rating,Author,PublishedDate,Content,CategoryID")] Review review) { if (ModelState.IsValid) { db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CategoryID = new SelectList(db.Categories, "CategoryID", "Name", review.CategoryID); return(View(review)); }
public ActionResult Edit([Bind(Include = "ReviewID,ArriveDate,DepartDate,Comment,Clean,PetFriendly,Pool,OnSiteDining,HouseKeeping,Concierge,NearBeach,BeachMiles,NearMountain,MountainMiles,BikesAvailable,ManyBikes,CategoryID")] Review review) { if (ModelState.IsValid) { db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CategoryID = new SelectList(db.Categories, "CategoryID", "Location", review.CategoryID); return(View(review)); }
public ActionResult Edit([Bind(Include = "ID,Location,Details,VacationDate,CategoryID")] Review review) { if (ModelState.IsValid) { db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CategoryID = new SelectList(db.Categories, "CategoryID", "Name", review.CategoryID); return(View(review)); }
public ActionResult Edit([Bind(Include = "ReviewID,Name,ReviewedDate,StarRating,Comments,LocationID,CategoryID")] Review review) { if (ModelState.IsValid) { db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CategoryID = new SelectList(db.Categories, "CategoryID", "Name", review.CategoryID); ViewBag.LocationID = new SelectList(db.Locations, "LocationID", "Name", review.LocationID); return(View(review)); }
public ActionResult Edit([Bind(Include = "ReviewID,Title,Date,ReviewImage,ReviewContent,CategoryID")] Review review) { if (ModelState.IsValid) { review.Date = DateTime.Today; db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CategoryID = new SelectList(db.Categories, "CategoryID", "CategoryName", review.CategoryID); return(View(review)); }