public ActionResult DeleteConfirmed(int id) { tblGuestFeedback tblGuestFeedback = db.tblGuestFeedbacks.Find(id); db.tblGuestFeedbacks.Remove(tblGuestFeedback); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "feedback_id,guest_phone_number,feedback_content,date_submitted,guest_email")] tblGuestFeedback tblGuestFeedback) { if (ModelState.IsValid) { db.Entry(tblGuestFeedback).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.guest_phone_number = new SelectList(db.tblGuests, "guest_phone_number", "guest_name", tblGuestFeedback.guest_phone_number); return(View(tblGuestFeedback)); }
// GET: Feedbacks/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblGuestFeedback tblGuestFeedback = db.tblGuestFeedbacks.Find(id); if (tblGuestFeedback == null) { return(HttpNotFound()); } return(View(tblGuestFeedback)); }
// GET: Feedbacks/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblGuestFeedback tblGuestFeedback = db.tblGuestFeedbacks.Find(id); if (tblGuestFeedback == null) { return(HttpNotFound()); } ViewBag.guest_phone_number = new SelectList(db.tblGuests, "guest_phone_number", "guest_name", tblGuestFeedback.guest_phone_number); return(View(tblGuestFeedback)); }