public ActionResult AddReview(Package_Review pr) { if (Session["UserID"] == null) { return(RedirectToAction("login", "Home")); } else { if (ModelState.IsValid) { using (var context = new DestCoveryContext()) { context.Package_revws.Add(pr); context.SaveChanges(); } return(RedirectToAction("Bookings", "Home")); } else { return(View()); } } }
public ActionResult ConfirmBooking(Bookings b, int bookingid, string user_no) { if (Session["AdminID"] == null) { return(RedirectToAction("login", "Admin")); } else { DestCoveryContext dcc = new DestCoveryContext(); var data = dcc.Booking_pckg.Where(x => x.Booking_Id == bookingid).FirstOrDefault(); if (data != null) { data.Booking_Status = "Confirm"; } dcc.SaveChanges(); MesageService ms = new MesageService(); string msg = "Welcome Sir/Madam !! Thank you for choosing us. I hope we will give some amazing experience throuout this tour. Let us know how it goes. Best wishes for a safe, happy, and healthy journey!! I hope you continue to enjoy our services! DESTCOVERY :) "; ms.TextLocal(user_no, msg); return(RedirectToAction("bookingpending", "Admin")); } }
public ActionResult BookNow(Bookings dcc) { if (Session["UserID"] == null) { return(RedirectToAction("login", "Home")); } else { if (ModelState.IsValid) { using (var context = new DestCoveryContext()) { context.Booking_pckg.Add(dcc); context.SaveChanges(); } return(RedirectToAction("Bookings", "Home")); } else { return(View()); } } }
public ActionResult AdminDetails() { DestCoveryContext dcc = new DestCoveryContext(); return(View(dcc.Admin.ToList())); }