protected void Button2_Click(object sender, EventArgs e) { if (DropListTypeKoords.SelectedValue.Equals("LINESTRING")) { GeographyKordinatesService.UpdateGeographyKoord(Convert.ToInt32(TextBoxIdKoords.Text), Convert.ToInt32(TextBoxSRID.Text), Convert.ToInt32(TextBoxRadiusKoords.Text), Convert.ToInt32(TextBoxHeightSea.Text), TextBoxDescriptionKoords.Text, DropListTypeKoords.SelectedValue, Convert.ToDouble(TextBoxKoords1.Text), Convert.ToDouble(TextBoxKoords2.Text), Convert.ToDouble(TextBoxKoords3.Text), Convert.ToDouble(TextBoxKoords4.Text)); } else if (DropListTypeKoords.SelectedValue.Equals("POINT")) { GeographyKordinatesService.UpdateGeographyKoord(Convert.ToInt32(TextBoxIdKoords.Text), Convert.ToInt32(TextBoxSRID.Text), Convert.ToInt32(TextBoxRadiusKoords.Text), Convert.ToInt32(TextBoxHeightSea.Text), TextBoxDescriptionKoords.Text, DropListTypeKoords.SelectedValue, Convert.ToDouble(TextBoxKoords1.Text), Convert.ToDouble(TextBoxKoords2.Text)); } using (var dbContext = new EntityFastWater.FastWaterContext()) { GridViewKoords.DataSource = DatabaseFastWaterService.GeographyKordinatesService.GetGeographicalKoordinatesEf() .Select(x => new { x.Id_GeographicalKoordinates, x.SRID, x.Koordinate, x.KoordinateText, x.HeighSeaLevel, x.TypeKoordinates, x.RadiusAction, x.description }); GridViewKoords.DataBind(); } }
protected void Button6_Click(object sender, EventArgs e) { GeographyKordinatesService.RemoveGeographicalKoordinatesEf(Convert.ToInt32(TextBoxIdKoords.Text)); GridViewPost.DataBind(); }