//
        // GET: /Geo/

        public ActionResult Index(string cityName, string geoClId, string geoDId)
        {
            GeoBiz geoBiz = GeoBiz.GetInstant();

            cityName = ObjectUtil.Parse(cityName, "广州");
            GeoModel geo = geoBiz.GetGeoByCityName(cityName);

            if (geo == null)
            {
                geo = geoBiz.GetGeoByCityName("广州");
            }

            GeoLocationModel geoLocation = null;
            PageSeoModel     seo         = PublicBiz.getCurPageSeo();

            this.setPageDesc(string.Format(seo.cityDesc, geo.cityCode, geo.cityName));
            this.setPageKeyWords(string.Format(seo.cityKeywords, geo.cityCode, geo.cityName));
            if (!string.IsNullOrEmpty(geoClId))
            {
                geoLocation = BaseZdBiz.Load <GeoCommercialLocationModel>(Restrictions.Eq("geoFk", geo.id), Restrictions.Eq("locationId", geoClId));
                this.setPageDesc(string.Format(seo.cityClDesc, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
                this.setPageKeyWords(string.Format(seo.cityClKeywords, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
            }
            else if (!string.IsNullOrEmpty(geoDId))
            {
                geoLocation = BaseZdBiz.Load <GeoDistrictsModel>(Restrictions.Eq("geoFk", geo.id), Restrictions.Eq("locationId", geoDId));
                this.setPageDesc(string.Format(seo.cityDDesc, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
                this.setPageKeyWords(string.Format(seo.cityDKeywords, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
            }

            ViewData[typeof(GeoLocationModel).Name] = geoLocation;
            ViewData[typeof(GeoModel).Name]         = geo;
            return(View());
        }
        public ActionResult Index()
        {
            PublicBiz      publicBiz = PublicBiz.GetInstant();
            FrontPageModel frontPage = publicBiz.getCurFrontPage();


            string[]         cityNames = frontPage.homeHotCityNameArray.Split(',');
            GeoBiz           geoBiz    = GeoBiz.GetInstant();
            IList <GeoModel> geos      = new List <GeoModel>();

            foreach (string cityName in cityNames)
            {
                GeoModel geo = geoBiz.GetGeoByCityName(cityName);
                geo.geoCls = geoBiz.GetGeoCls(geo.id);
                geo.geoDs  = geoBiz.GetGeoDs(geo.id);
                geo.geoLls = geoBiz.GetGeoLls(geo.id);
                geos.Add(geo);
            }
            ViewData[typeof(IList <GeoModel>).Name] = geos;
            this.VdCityTopHotel(20, cityNames);
            this.VdHotBookingHotel(10);
            this.VdHotBrand(12);
            this.VdHotCity(15);

            this.setPageDesc(PublicBiz.getCurPageSeo().hotelIndexDesc);
            this.setPageKeyWords(PublicBiz.getCurPageSeo().hotelIndexKeywords);

            return(View());
        }
Exemple #3
0
        //
        // GET: /Exhi/

        public ActionResult Index(string cityName, string keyword)
        {
            ICriteria icr    = BaseZdBiz.CreateCriteria <ExhiModel>(new PagerObject(1, 20));
            GeoBiz    geoBiz = GeoBiz.GetInstant();

            if (WebUtil.IsPost())
            {
                GeoModel geo = geoBiz.GetGeoByCityName(cityName);
                icr.Add(Restrictions.Eq("geoFk", geo.id));
                icr.Add(Restrictions.Like("name", "%" + keyword + "%"));
            }
            icr.AddOrder(Order.Desc("startDate"));
            IList <ExhiModel> exhis = icr.List <ExhiModel>();

            ViewData[typeof(ExhiModel).Name] = exhis;
            this.VdHotBookingHotel(10);
            this.VdHotBrand(12);
            this.VdHotCity(15);

            PageSeoModel seo = PublicBiz.getCurPageSeo();

            this.setPageDesc(seo.exhiIndexDesc);
            this.setPageKeyWords(seo.exhiIndexKeywords);
            return(View());
        }
Exemple #4
0
        //
        // GET: /Brand/

        public ActionResult Index()
        {
            ICriteria icr = BaseZdBiz.CreateCriteria <BrandModel>();

            icr.Add(Restrictions.IsNotNull("picURL"));
            //IList<BrandModel> brands = icr.List<BrandModel>();
            // IList<BrandModel> tempBrands = new List<BrandModel>();
            //foreach (BrandModel brand in brands) {
            //    if (string.IsNullOrEmpty(brand.picURL)) {
            //       continue;
            //   }
            //   tempBrands.Add(brand);
            //}
            // ViewData[VD_KEY_HOT_BRAND_LIST] = tempBrands;

            this.VdHotBookingHotel(10);
            this.VdHotBrand(500);
            this.VdHotCity(15);
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            this.setPageDesc(seo.brandIndexDesc);
            this.setPageKeyWords(seo.brandIndexKeywords);


            return(View());
        }
Exemple #5
0
        //
        // GET: /Comment/

        public ActionResult Index()
        {
            ICriteria icr = BaseZdBiz.CreateCriteria <HotelCommentModel>(this.getPager());

            icr.AddOrder(Order.Desc("createDate"));
            IList <HotelCommentModel> hotelComments = icr.List <HotelCommentModel>();

            ViewData[typeof(HotelCommentModel).Name] = hotelComments;
            this.VdHotBookingHotel(10);
            this.VdHotBrand(12);
            this.VdHotCity(15);
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            this.setPageDesc(seo.commentIndexDesc);
            this.setPageKeyWords(seo.commentIndexKeywords);
            return(View());
        }
        public ActionResult Search(string cityName, string keyWord, string geoClId, string geoDId, DateTime?checkInDate)
        {
            PublicBiz      publicBiz = PublicBiz.GetInstant();
            FrontPageModel frontPage = publicBiz.getCurFrontPage();
            GeoBiz         geoBiz    = GeoBiz.GetInstant();
            GeoModel       geo       = geoBiz.GetGeoByCityName(cityName);

            this.VdGeoLocation(geo);
            GeoLocationModel geoLocation = null;
            PageSeoModel     seo         = PublicBiz.getCurPageSeo();

            this.setPageDesc(string.Format(seo.cityDesc, geo.cityCode, geo.cityName));
            this.setPageKeyWords(string.Format(seo.cityKeywords, geo.cityCode, geo.cityName));
            if (!string.IsNullOrEmpty(geoClId))
            {
                geoLocation = BaseZdBiz.Load <GeoCommercialLocationModel>(Restrictions.Eq("geoFk", geo.id), Restrictions.Eq("locationId", geoClId));
                this.setPageDesc(string.Format(seo.cityClDesc, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
                this.setPageKeyWords(string.Format(seo.cityClKeywords, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
            }
            else if (!string.IsNullOrEmpty(geoDId))
            {
                geoLocation = BaseZdBiz.Load <GeoDistrictsModel>(Restrictions.Eq("geoFk", geo.id), Restrictions.Eq("locationId", geoDId));
                this.setPageDesc(string.Format(seo.cityDDesc, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
                this.setPageKeyWords(string.Format(seo.cityDKeywords, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
            }
            else if (!string.IsNullOrEmpty(keyWord))
            {
                this.setPageDesc(string.Format(seo.hotelSearchDesc, cityName, keyWord, (checkInDate ?? DateTime.Now).ToShortDateString()));

                this.setPageKeyWords(string.Format(seo.hotelSearchKeywords, cityName, keyWord, (checkInDate ?? DateTime.Now).ToShortDateString()));
            }
            ViewData[typeof(GeoLocationModel).Name] = geoLocation;

            ICriteria icr = BaseZdBiz.CreateCriteria <BrandModel>();

            string[] brandNames = frontPage.searchBrandNameArray.Split(',');
            icr.Add(Restrictions.In("brandName", brandNames));
            IList <BrandModel> brands = icr.List <BrandModel>();

            ViewData[typeof(BrandModel).Name] = brands;
            this.VdHotCity(15);
            return(View());
        }
        public ActionResult Index(string keyword)
        {
            ICriteria icr = BaseZdBiz.CreateCriteria <NewsModel>();

            icr.AddOrder(Order.Desc("deployDate"));
            if (WebUtil.IsPost())
            {
                icr.Add(Restrictions.Like("title", "%" + keyword + "%"));
            }
            IList <NewsModel> newss = icr.List <NewsModel>();

            ViewData[typeof(NewsModel).Name] = newss;
            this.VdHotBookingHotel(10);
            this.VdHotBrand(12);
            this.VdHotCity(15);
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            this.setPageDesc(seo.newsIndexDesc);
            this.setPageKeyWords(seo.newsIndexKeywords);
            return(View());
        }
Exemple #8
0
        public ActionResult BrandHotel(string brandId)
        {
            ICriteria icr = BaseZdBiz.CreateCriteria <HotelDetailModel>();

            icr.Add(Restrictions.Eq("brandId", brandId));
            IList <HotelDetailModel> hotels = icr.List <HotelDetailModel>();

            ViewData[typeof(HotelDetailModel).Name] = hotels;

            BrandModel brand = BaseZdBiz.Load <BrandModel>(brandId);

            ViewData[typeof(BrandModel).Name] = brand;
            this.VdHotBookingHotel(10);
            this.VdHotCity(15);
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            //{0}品牌code,{1}:品牌长名,{2}:品牌短名, {3}:拼音
            this.setPageDesc(string.Format(seo.brandHotelDesc, brand.brandID, brand.brandNameLong, brand.brandName, brand.brandPinYin));
            this.setPageKeyWords(string.Format(seo.brandHotelKeywords, brand.brandID, brand.brandNameLong, brand.brandName, brand.brandPinYin));
            return(View());
        }
Exemple #9
0
        public ActionResult ExhiHotel(string exhiId)
        {
            ExhiModel exhi = BaseZdBiz.Load <ExhiModel>(exhiId);
            ICriteria icr  = BaseZdBiz.CreateCriteria <ExhiRefHotelModel>();

            icr.Add(Restrictions.Eq("exhiId", exhiId));
            IList <ExhiRefHotelModel> refHotels = icr.List <ExhiRefHotelModel>();
            IList <string>            ids       = new List <string>();

            if (refHotels.Count > 0)
            {
                ids = ObjectUtil.GetProList(refHotels, "hotelId");
            }
            else
            {
                icr = BaseZdBiz.CreateCriteria <HotelModel>(new PagerObject(1, 10));
                icr.Add(Restrictions.Eq("recInd", BaseModel.IND_Y));
                IList <HotelModel> hotels = icr.List <HotelModel>();
                ids = ObjectUtil.GetProList(hotels, "hotelId");
            }

            exhi.hotelIdArray = StringUtil.UnionArray(ids.ToArray(), ',');
            icr = BaseZdBiz.CreateCriteria <ExhiModel>();
            icr.Add(Restrictions.Eq("geoFk", exhi.geoFk));
            icr.Add(Restrictions.Not(Restrictions.Eq("id", exhi.id)));
            icr.AddOrder(Order.Desc("startDate"));
            IList <ExhiModel> exhis = icr.List <ExhiModel>();

            ViewData["refExhis"]             = exhis;
            ViewData[typeof(ExhiModel).Name] = exhi;
            this.VdHotCity(15);

            PageSeoModel seo = PublicBiz.getCurPageSeo();

            //{0}展会code,{1}:展会名,{2}:展会地址, {3}:展会时间 ,{4}:行业,{5}:内容
            this.setPageDesc(string.Format(seo.exhiHotelDesc, exhi.id, exhi.name, exhi.address, exhi.startDate.ToShortDateString(), exhi.busName, exhi.msg).Substring(0, 228));
            this.setPageKeyWords(string.Format(seo.exhiHotelKeywords, exhi.id, exhi.name, exhi.address, exhi.startDate.ToShortDateString(), exhi.busName, exhi.msg));
            return(View());
        }
        public ActionResult NewsHotel(string newsId)
        {
            NewsModel news = BaseZdBiz.Load <NewsModel>(newsId);

            ICriteria icr = BaseZdBiz.CreateCriteria <NewsRefHotelModel>();

            icr.Add(Restrictions.Eq("newsId", newsId));
            IList <NewsRefHotelModel> refHotels = icr.List <NewsRefHotelModel>();
            IList <string>            ids       = new List <string>();

            if (refHotels.Count > 0)
            {
                ids = ObjectUtil.GetProList(refHotels, "hotelId");
            }
            else
            {
                icr = BaseZdBiz.CreateCriteria <HotelModel>(new PagerObject(1, 10));
                icr.Add(Restrictions.Eq("recInd", BaseModel.IND_Y));
                IList <HotelModel> hotels = icr.List <HotelModel>();
                ids = ObjectUtil.GetProList(hotels, "hotelId");
            }
            news.hotelIdArray = StringUtil.UnionArray(ids.ToArray(), ',');

            icr = BaseZdBiz.CreateCriteria <NewsModel>(new PagerObject(1, 5));
            icr.Add(Restrictions.Not(Restrictions.Eq("id", newsId)));
            icr.AddOrder(Order.Desc("deployDate"));
            IList <NewsModel> refNews = icr.List <NewsModel>();

            ViewData["refNews"] = refNews;
            ViewData[typeof(NewsModel).Name] = news;
            this.VdHotCity(15);

            //{0}新闻code,{1}:新闻主题,{2}:新闻日期 ,{3}:新闻内容
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            this.setPageDesc(string.Format(seo.newsHotelDesc, news.id, news.title, news.deployDate.ToShortDateString(), news.context).Substring(0, 228));
            this.setPageKeyWords(string.Format(seo.newsHotelKeywords, news.id, news.title, news.deployDate.ToShortDateString(), news.context));
            return(View());
        }
        public ActionResult Index()
        {
            GeoBiz         geoBiz    = GeoBiz.GetInstant();
            PublicBiz      publicBiz = PublicBiz.GetInstant();
            FrontPageModel frontPage = publicBiz.getCurFrontPage();


            // icr=BaseZdBiz.CreateCriteria<HotelCommentModel>(new PagerObject(1,10));
            // IList<HotelCommentModel> listComment = icr.List<HotelCommentModel>();
            // ViewData[typeof(HotelCommentModel).Name] = listComment;

            this.VdHotNews(4);
            this.VdHotBrand(16);
            string[] cityNames = frontPage.homeHotCityNameArray.Split(',');
            this.VdCityTopHotel(10, cityNames);
            this.VdHotBookingHotel(10);
            this.VdHotCommentHotel(10);
            this.VdHotCity(15);

            this.setPageDesc(PublicBiz.getCurPageSeo().homeIndexDesc);
            this.setPageKeyWords(PublicBiz.getCurPageSeo().homeIndexKeywords);
            return(View());
        }
        //
        // GET: /Hotel/

        public ActionResult Detail(string hotelId)
        {
            HotelDetailModel hotelDetail = BaseZdBiz.Load <HotelDetailModel>(hotelId);

            ViewData[typeof(HotelDetailModel).Name] = hotelDetail;

            HotelFeatrueInfoModel hotelFi = BaseZdBiz.Load <HotelFeatrueInfoModel>(hotelId);

            ViewData[typeof(HotelFeatrueInfoModel).Name] = hotelFi;

            HotelModel hotel = BaseZdBiz.Load <HotelModel>(hotelId);

            ViewData[typeof(HotelModel).Name] = hotel;

            ICriteria icr = BaseZdBiz.CreateCriteria <HotelImageModel>();

            icr.Add(Restrictions.Eq("hotelFk", hotelId));
            IList <HotelImageModel> images = icr.List <HotelImageModel>();

            ViewData[typeof(HotelImageModel).Name] = images;

            GeoBiz   geoBiz = GeoBiz.GetInstant();
            GeoModel geo    = geoBiz.GetGeoByCityId(hotelDetail.city);

            this.VdGeoLocation(geo);


            icr = BaseZdBiz.CreateCriteria <HotelLandMarkModel>();
            icr.Add(Restrictions.Eq("hotelFk", hotelDetail.id));
            IList <HotelLandMarkModel> hotelLls = icr.List <HotelLandMarkModel>();

            ViewData[typeof(HotelLandMarkModel).Name] = hotelLls;

            icr = BaseZdBiz.CreateCriteria <HotelSurroundingAttractionModel>();
            icr.Add(Restrictions.Eq("hotelFk", hotelDetail.id));
            IList <HotelSurroundingAttractionModel> hotelSas = icr.List <HotelSurroundingAttractionModel>();

            ViewData[typeof(HotelSurroundingAttractionModel).Name] = hotelSas;

            icr = BaseZdBiz.CreateCriteria <HotelSurroundingCommerceModel>();
            icr.Add(Restrictions.Eq("hotelFk", hotelDetail.id));
            IList <HotelSurroundingCommerceModel> hotelScs = icr.List <HotelSurroundingCommerceModel>();

            ViewData[typeof(HotelSurroundingCommerceModel).Name] = hotelScs;

            icr = BaseZdBiz.CreateCriteria <HotelSurroundingRestaurantModel>();
            icr.Add(Restrictions.Eq("hotelFk", hotelDetail.id));
            IList <HotelSurroundingRestaurantModel> hotelSrs = icr.List <HotelSurroundingRestaurantModel>();

            ViewData[typeof(HotelSurroundingRestaurantModel).Name] = hotelSrs;

            icr = BaseZdBiz.CreateCriteria <HotelSurroundingShopModel>();
            icr.Add(Restrictions.Eq("hotelFk", hotelDetail.id));
            IList <HotelSurroundingShopModel> hotelSss = icr.List <HotelSurroundingShopModel>();

            ViewData[typeof(HotelSurroundingShopModel).Name] = hotelSss;

            icr = BaseZdBiz.CreateCriteria <HotelTrafficInfoModel>();
            icr.Add(Restrictions.Eq("hotelFk", hotelDetail.id));
            IList <HotelTrafficInfoModel> hotelTrs = icr.List <HotelTrafficInfoModel>();

            ViewData[typeof(HotelTrafficInfoModel).Name] = hotelTrs;


            icr = BaseZdBiz.CreateCriteria <HotelCommentModel>(new PagerObject(1, 5));
            icr.Add(Restrictions.Eq("hotelFk", hotelDetail.id));
            icr.AddOrder(Order.Desc("createDate"));
            IList <HotelCommentModel> hotelComments = icr.List <HotelCommentModel>();

            ViewData[typeof(HotelCommentModel).Name] = hotelComments;
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            this.setPageDesc(string.Format(seo.hotelDetailDesc, hotel.hotelId, hotel.hotelName, hotelDetail.address, hotelDetail.description, geo.cityCode, geo.cityName));
            this.setPageKeyWords(string.Format(seo.hotelDetailKeywords, hotel.hotelId, hotel.hotelName, hotelDetail.address, hotelDetail.description, geo.cityCode, geo.cityName));
            this.VdHotCity(15);
            return(View());
        }
Exemple #13
0
 public ActionResult ConfigPageSeo()
 {
     ViewData[typeof(PageSeoModel).Name] = PublicBiz.getCurPageSeo();
     return(View());
 }