Exemplo n.º 1
0
        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());
                }
            }
        }
Exemplo n.º 2
0
        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"));
            }
        }
Exemplo n.º 3
0
        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());
                }
            }
        }
Exemplo n.º 4
0
        public ActionResult AdminDetails()
        {
            DestCoveryContext dcc = new DestCoveryContext();

            return(View(dcc.Admin.ToList()));
        }