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 ); } }
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; }
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(); }