protected void VdCityTopHotel(int rows, string[] cityNames) { Dictionary <string, IList <HotelDetailModel> > dictCityHotels = new Dictionary <string, IList <HotelDetailModel> >(); Dictionary <string, IList <GeoCommercialLocationModel> > dictCityGeoCls = new Dictionary <string, IList <GeoCommercialLocationModel> >(); ICriteria icr = null; GeoBiz geoBiz = GeoBiz.GetInstant(); DataBiz dataBiz = DataBiz.GetInstant(); IList <HotelDetailModel> hotelDetails = dataBiz.getHotHotelDetail(); foreach (string cityName in cityNames) { IList <HotelDetailModel> tempHotelDetails = new List <HotelDetailModel>(); GeoModel geo = geoBiz.GetGeoByCityName(cityName); string cityId = geo.cityCode; foreach (HotelDetailModel hotelDetail in hotelDetails) { if (tempHotelDetails.Count == rows) { break; } if (hotelDetail.city == cityId) { tempHotelDetails.Add(hotelDetail); } } dictCityHotels.Add(cityName, tempHotelDetails); IList <GeoCommercialLocationModel> geoCls = geoBiz.GetGeoCls(geo.id); dictCityGeoCls.Add(cityName, geoCls); } ViewData[VD_KEY_CITY_HOT_HOTEL_DICT] = dictCityHotels; ViewData[VD_KEY_CITY_HOT_GEO_CLS_DICT] = dictCityGeoCls; }