protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["IDPoligono"] != null) { string IDPoligono = Request.QueryString["IDPoligono"].ToString(); CH_Poligono Datos = new CH_Poligono(); Datos.IDPoligono = IDPoligono; Datos.Conexion = "Server=tcp:serv-campaniaelectoral.database.windows.net,1433;Initial Catalog=CSLDB_CAMPANIAELECTORAL;Persist Security Info=False;User ID=campaniaAdmin;Password=C4mp4n14373C;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"; CH_PoligonoNegocio CN = new CH_PoligonoNegocio(); CN.ObtenerDetallePoligonoXID(Datos); CH_PoligonoDetalleJSON DatosAux = new CH_PoligonoDetalleJSON { Latitud = Datos.Latidud, Longitud = Datos.Longitud }; var json = JsonConvert.SerializeObject(DatosAux); Response.Clear(); Response.ContentType = "application/text;"; Response.Write(json); Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["IDCasilla"] != null) { int IDCasilla = 0; int.TryParse(Request.QueryString["IDCasilla"].ToString(), out IDCasilla); CH_ZonaRiesgo Datos = new CH_ZonaRiesgo(); Datos.IDCasilla = IDCasilla; Datos.Conexion = "Server=tcp:serv-campaniaelectoral.database.windows.net,1433;Initial Catalog=CSLDB_CAMPANIAELECTORAL;Persist Security Info=False;User ID=campaniaAdmin;Password=C4mp4n14373C;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"; ER_SeccionesNegocio CN = new ER_SeccionesNegocio(); CN.ObtenerUbicacionCasilla(Datos); CH_PoligonoDetalleJSON DatosAux = new CH_PoligonoDetalleJSON { Latitud = Datos.Latitud, Longitud = Datos.Longitud, Titulo = Datos.Titulo, Descripcion = Datos.Descripcion }; var json = JsonConvert.SerializeObject(DatosAux); Response.Clear(); Response.ContentType = "application/text;"; Response.Write(json); Response.End(); } }