public ActionResult Index(string id)
        {
            if (id == null)
            {
                id = "";
            }
            IEnumerable <Hotel> Lhotels = con.GetAllHotel();

            // IEnumerable<Product> products = repo.GetProducts();
            if (!string.IsNullOrEmpty(id) && id != "All")
            {
                Lhotels = Lhotels.Where(p => p.HotelName.ToLower() == id.ToLower());
            }
            return(View(Lhotels));
        }
Exemplo n.º 2
0
        //public Package GetPackagename(string P_Name)
        //{
        //    Package pkg = null;

        //    pkg = (Package)db.Packages.Where(x => x.PlaceName == P_Name).First();


        //    return pkg;
        //}



        //Hotel
        public ActionResult Hotels(string Id)
        {
            if (Id == null)
            {
                Id = "";
            }
            IEnumerable <Hotel> ListHotels = con.GetAllHotel();



            // IEnumerable<Product> products = repo.GetProducts();
            if (!string.IsNullOrEmpty(Id) && Id != "All")
            {
                ListHotels = ListHotels.Where(p => p.HotelName.ToLower() == Id.ToLower());
            }
            return(View(ListHotels));
        }