protected void Button_submit_Click(object sender, EventArgs e) { SysFunction sf = new SysFunction(); LocalData tmp = this.U_localdata1.localdata; int result = sf.add_localdata(tmp); double[] gcj = LbsTrans.BD09toGCJ02(tmp.Lng, tmp.Lat); tmp.Lng = gcj[0]; tmp.Lat = gcj[1]; result += sf.add_localdata_gcj(tmp); double[] wgs = LbsTrans.GCJ02toWGS84(tmp.Lng, tmp.Lat); tmp.Lng = wgs[0]; tmp.Lat = wgs[1]; result += sf.add_localdata_wgs(tmp); if (result == 3) { Response.Write("<script language='javascript'>alert('添加成功'); location.href='AddNode.aspx'</script>"); } else { Response.Write("<script language='javascript'>alert('添加失败: 成功" + result + "条记录');"); } }