public enGmap GmapGetir() { StringBuilder sb = new StringBuilder(); sb.Append("SELECT * FROM GMap"); MySqlDataAdapter adp = new MySqlDataAdapter(sb.ToString(), FxMySqlHelper.Connection()); DataTable dt = new DataTable(); adp.Fill(dt); enGmap gmap = new enGmap(); if (dt.Rows.Count > 0) { DataRow rw = dt.Rows[0]; gmap.Id = rw["gmap_id"].xToIntDefault(); gmap.APIKey = rw["gmap_apiKey"].ToString(); gmap.Latitude = rw["gmap_lat"].ToString(); gmap.Longitude = rw["gmap_long"].ToString(); gmap.Statu = rw["gmap_statu"].xToBooleanDefault(); gmap.Metin = rw["gmap_metin"].ToString(); } return(gmap); }
protected void GmapGetir() { enGmap gmap = bllGmap.GmapGetir(); txtLat.Text = gmap.Latitude; txtLong.Text = gmap.Longitude; edtGmapMetin.Content = gmap.Metin; //string latitude = gmap.Latitude.Replace('.', ','); //string longitude = gmap.Longitude.Replace('.', ','); //double gmapLat = latitude.xToDoubleDefault(); //double gmapLong = longitude.xToDoubleDefault(); //GMap1.addControl(new GControl(GControl.preBuilt.LargeMapControl)); //GMap1.Key = gmap.APIKey; //GLatLng nokta = new GLatLng(gmapLat, gmapLong); //GMap1.setCenter(nokta, 15); //GMarker marker = new GMarker(nokta); //marker.options = new GMarkerOptions(); //marker.options.clickable = true; //GInfoWindow window = new GInfoWindow(marker, gmap.Metin, true); //GMap1.addInfoWindow(window); }
public void GmapGuncelle(enGmap gmap) { Dictionary <string, object> dict = new Dictionary <string, object>(); List <object> degerList = new List <object>(); dict.Add("gmap_lat", gmap.Latitude); degerList.Add(gmap.Latitude); dict.Add("gmap_long", gmap.Longitude); degerList.Add(gmap.Longitude); dict.Add("gmap_apiKey", gmap.APIKey); degerList.Add(gmap.APIKey); dict.Add("gmap_statu", gmap.Statu); degerList.Add(gmap.Statu); dict.Add("gmap_metin", gmap.Metin); degerList.Add(gmap.Metin); FxMySqlHelper.Update("GMap", dict, "gmap_id", gmap.Id); }
protected void btnGmapKaydet_Click(object sender, EventArgs e) { enGmap gmap = bllGmap.GmapGetir(); gmap.Latitude = txtLat.Text; gmap.Longitude = txtLong.Text; gmap.Metin = edtGmapMetin.Content; gmap.Id = 1; bllGmap.GmapGuncelle(gmap); GmapGetir(); }
public static void GmapGuncelle(enGmap gmap) { new dalGmap().GmapGuncelle(gmap); }
public string MapGetir() { enGmap gmap = bllGmap.GmapGetir(); return(JsonConvert.SerializeObject(gmap)); }