Пример #1
0
 public static string GetPathDHotel(GeoModel geo,GeoLocationModel geoD)
 {
     string pattern = "{0}{1}";
     string filePath = System.Configuration.ConfigurationManager.AppSettings["ZDSL.Webapp.path.Hotel.D"];
     filePath = string.Format(filePath, geo.cityCode,geoD.locationId);
     if (IsDebug())
     {
         return string.Format(pattern, WebUtil.GetWebRootPath(), "/Public/Hotel/Search?cityName=" + geo.cityName + "&geoDId="+ geoD.locationId);
     }
     else
     {
         return string.Format(pattern, WebUtil.GetWebRootPath(), filePath );
     }
 }
Пример #2
0
        protected void VdGeoLocation(GeoModel geo)
        {
            GeoBiz geoBiz = GeoBiz.GetInstant();
            ViewData[VD_KEY_GEO] = geo;
            IList<GeoCommercialLocationModel> geoCls = geoBiz.GetGeoCls(geo.id);
            ViewData[VD_KEY_GEO_CLS] = geoCls;

            IList<GeoDistrictsModel> geoDs = geoBiz.GetGeoDs(geo.id);
            ViewData[VD_KEY_GEO_DS] = geoDs;

            IList<GeoLandmarkLocationModel> geoLLs = geoBiz.GetGeoLls(geo.id);
            ViewData[VD_KEY_GEO_LLS] = geoLLs;
        }
Пример #3
0
 public void ImportGeoList()
 {
     IList<ELongGeoAdapter> Geos = ELongStaticClient.GetGeoList();
     this.OpenSession();
     ITransaction tx = this.session.BeginTransaction();
     foreach (ELongGeoAdapter geo in Geos)
     {
         GeoModel temp = new GeoModel();
         temp.from(geo);
         System.Console.WriteLine(string.Format("{0}:{1}:{2}:{3}", temp.id, temp.provinceName, temp.cityName, temp.url));
         this.session.SaveOrUpdate(temp);
     }
     tx.Commit();
 }