Esempio n. 1
0
        public ActionResult GetHotelStar(string hotelStars, string checkin, string checkout)
        {
            DateTime checkinDate  = checkin == null ? DateTime.Now : Convert.ToDateTime(checkin);
            DateTime checkoutDate = checkout == null ? DateTime.Now : Convert.ToDateTime(checkout);

            List <string> hotelStarsKey = hotelStars == null ? null : hotelStars.Split(',').ToList();

            List <string> hotelProperties = null;

            List <string> districts = null;

            int minAmount = 0;

            int maxAmount = 0;

            HotelSearchHelper helper = new HotelSearchHelper();

            List <HotelSearchItem> hotelList = helper.hotelItem(districts, hotelProperties, hotelStarsKey, minAmount, maxAmount, checkinDate, checkoutDate);

            return(Json(hotelList));
        }
Esempio n. 2
0
        public ActionResult GetHotelMinMaxAmount(string minAmount, string maxAmount, string checkin, string checkout)
        {
            DateTime checkinDate  = checkin == null ? DateTime.Now : Convert.ToDateTime(checkin);
            DateTime checkoutDate = checkout == null ? DateTime.Now : Convert.ToDateTime(checkout);

            int minAmountKey = Convert.ToInt32(minAmount);

            int maxAmountKey = Convert.ToInt32(maxAmount);

            List <string> hotelStars = null;

            List <string> hotelProperties = null;

            List <string> districts = null;

            HotelSearchHelper helper = new HotelSearchHelper();

            List <HotelSearchItem> hotelList = helper.hotelItem(districts, hotelProperties, hotelStars, minAmountKey, maxAmountKey, checkinDate, checkoutDate);

            return(Json(hotelList));
        }