/// <summary> /// Deprecated Method for adding a new object to the Locations EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToLocations(Location location) { base.AddObject("Locations", location); }
/// <summary> /// Create a new Location object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="city">Initial value of the City property.</param> /// <param name="state">Initial value of the State property.</param> /// <param name="pIN">Initial value of the PIN property.</param> /// <param name="street">Initial value of the street property.</param> /// <param name="publisherId">Initial value of the PublisherId property.</param> public static Location CreateLocation(global::System.Int32 id, global::System.String city, global::System.String state, global::System.String pIN, global::System.String street, global::System.Int32 publisherId) { Location location = new Location(); location.Id = id; location.City = city; location.State = state; location.PIN = pIN; location.street = street; location.PublisherId = publisherId; return location; }
/// <summary> /// Create a new Location object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static Location CreateLocation(global::System.Int32 id) { Location location = new Location(); location.ID = id; return location; }
public void ClickEvent(string strlocation) { int ijudge = 0; if (strlocation == "突发事件") ijudge = 1; else if (strlocation == "自然灾害") ijudge = 2; DataTable dt = new DataTable(); SQLHelper.getPointsByCategory(ijudge, out dt); List<Location> m_list = new List<Location>(); for (int ix = 0; ix < dt.Rows.Count; ix++) { Location new_Location = new Location(); new_Location.Name = dt.Rows[ix]["Name"].ToString(); new_Location.Description = dt.Rows[ix]["Description"].ToString(); new_Location.Tel = dt.Rows[ix]["Tel"].ToString(); new_Location.Longitude = (double)dt.Rows[ix]["ilng"]; new_Location.Latitude = (double)dt.Rows[ix]["ilat"]; m_list.Add(new_Location); } strlocation = ToJsJson(m_list); this.Name = strlocation; }
public void ClickEvent(string strlocation) { if (strlocation.Equals("绿色监测")) { List<GreenDetect> m_greenDetectlist = new List<GreenDetect> { new GreenDetect{ Latitude=31.288236, Longitude=121.508837, Energy="23", Water="23", Name="水耗能耗" }, new GreenDetect{ Latitude=31.289236, Longitude=121.505837, Energy="23", Water="23", Name="水耗能耗" }, new GreenDetect{ Latitude=31.288236, Longitude=121.506837, Energy="23", Water="23", Name="水耗能耗" }, new GreenDetect{ Latitude=31.287236, Longitude=121.508837, Energy="23", Water="23", Name="水耗能耗" }, new GreenDetect{ Latitude=31.286236, Longitude=121.507837, Energy="23", Water="23", Name="水耗能耗" }, }; strlocation = ToJsJson(m_greenDetectlist); this.Name = strlocation; return; } int ijudge = 0; if (strlocation == "突发事件") ijudge = 1; else if (strlocation == "自然灾害") ijudge = 2; DataTable dt = new DataTable(); SQLHelper.getPointsByCategory(ijudge, out dt); List<Location> m_list = new List<Location>(); for (int ix = 0; ix < dt.Rows.Count; ix++) { Location new_Location = new Location(); new_Location.Name = dt.Rows[ix]["Name"].ToString(); new_Location.Description = dt.Rows[ix]["Description"].ToString(); new_Location.Tel = dt.Rows[ix]["Tel"].ToString(); new_Location.Longitude = (double)dt.Rows[ix]["ilng"]; new_Location.Latitude = (double)dt.Rows[ix]["ilat"]; m_list.Add(new_Location); } strlocation = ToJsJson(m_list); this.Name = strlocation; }
public void ClickEventEnv(string strEnv) { int ijudge = 0; if (strEnv == "环境污染") { ijudge = 4; } DataTable dtEnv = new DataTable(); SQLHelper.getPointsByCategory(ijudge, out dtEnv); List<Location> m_listEnv = new List<Location>(); for (int ix = 0; ix < dtEnv.Rows.Count; ix++) { Location new_Location = new Location(); new_Location.Name = dtEnv.Rows[ix]["Name"].ToString(); new_Location.Description = dtEnv.Rows[ix]["Description"].ToString(); new_Location.Longitude = (double)dtEnv.Rows[ix]["ilng"]; new_Location.Latitude = (double)dtEnv.Rows[ix]["ilat"]; m_listEnv.Add(new_Location); } strEnv = ToJsJson(m_listEnv); this.Name = strEnv; }