public ActionResult Reserve(Reservation reservation)
        {
            ViewBag.postMethodId = 1;
            var regForPhone = new Regex(@"[01]\d{9}");
            if (ModelState.IsValid)
            {
                try
                {
                    var checkIsReservationAlreadyExist = _db.Reservations.Any(c => c.Email.Equals(reservation.Email));
                    if (!checkIsReservationAlreadyExist)
                    {
                        var findCustomerRegistrationEmail =

                    _db.Customers.Single(m => m.Username.Equals(User.Identity.Name)).Email;

                        if (findCustomerRegistrationEmail == reservation.Email)
                        {

                            if (reservation.Country == "Bangladesh")
                            {
                                int banPhoneNum = Convert.ToInt32(reservation.Phonenumber);
                                if (regForPhone.IsMatch(banPhoneNum.ToString()))
                                {
                                    if (reservation.Standard != null || reservation.Suit != null || reservation.Deluxi != null ||
                                        reservation.Delux != null)
                                    {

                                        _db.Reservations.Add(reservation);
                                        _db.SaveChanges();
                                        return RedirectToAction("SuccessfulMessage", "CustomerReservation",
                                            new { area = "Customer" });
                                    }
                                    if (reservation.Standard == null || reservation.Suit == null || reservation.Deluxi == null ||
                                        reservation.Delux == null)
                                    {

                                        ViewBag.RoomReqMessId = 1;

                                    }
                                }
                                else
                                {
                                    ViewBag.MobNoInvalidId = 1;
                                }
                            }

                            else
                            {
                                if (reservation.Standard != null || reservation.Suit != null || reservation.Deluxi != null ||
                                    reservation.Delux != null)
                                {

                                    _db.Reservations.Add(reservation);
                                    _db.SaveChanges();
                                    return RedirectToAction("SuccessfulMessage", "CustomerReservation", new { area = "Customer" });
                                }
                                if (reservation.Standard == null || reservation.Suit == null || reservation.Deluxi == null ||
                                    reservation.Delux == null)
                                {
                                    ViewBag.RoomReqMessId = 1;

                                }
                            }

                        }
                        else
                        {
                            ModelState.AddModelError("", "Please enter the Email which you used at the time of Registration.");

                        }

                    }
                    else
                    {
                        ModelState.AddModelError("", "A record already exist for Email ID => "+reservation.Email);

                    }

            }

                catch (Exception msg)
                {

                    Response.Write("<div id='resRoomReq'>");

                    Response.Write(msg.Message);
                    Response.Write("</div>");

                }
                ViewBag.notificationHideId = 1;
            }

            return View(reservation);
        }
        public ActionResult EditList(int id, String cmd)
        {
            var reserinfo = new Reservation();
            reserinfo = _db.Reservations.Single(x => x.Id.Equals(id));
            UpdateModel(reserinfo, new string[] { "Standard", "Suit", "Deluxi", "Delux" });
            if (ModelState.IsValid)
            {

                if (cmd == "Save")
                {

                    try
                    {

                        _db.Reservations.Add(reserinfo);

                        _db.SaveChanges();

                        return RedirectToAction("ReservationInfoList");

                    }

                    catch { }

                }

                else
                {

                    try
                    {

                        var singleInfo = _db.Reservations.Where(m => m.Id == reserinfo.Id).FirstOrDefault();

                        if (singleInfo != null)
                        {
                            singleInfo.Standard = reserinfo.Standard;
                            singleInfo.Suit = reserinfo.Suit;
                            singleInfo.Deluxi = reserinfo.Deluxi;
                            singleInfo.Delux = reserinfo.Delux;
                            _db.SaveChanges();

                        }

                        return RedirectToAction("ReservationInfoList");

                    }

                    catch { }

                }

            }

            if (Request.IsAjaxRequest())
            {

                return PartialView("_EditList", reserinfo);

            }

            else
            {

                return View("EditList", reserinfo);

            }
        }