| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using BizCom;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using Utils;
- using SiteCore;
- public partial class bdrr_plug_PositionMap : BasePage
- {
- protected override void OnPreInit(EventArgs e)
- {
- //PmTag = "merlist";
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- //if(UrlParmsCheck("iid"))
- //{
- // string mId = GetString("id");
- // DataTable dt = SInst.Query("ID=" + mId);
- // if (dt == null || dt.Rows.Count < 1) { Response.Write("错误页面!");Response.End(); return; }
- // DataRow dr = dt.Rows[0];
- // string mName = dr["Name"].ToString();
- // lblAddress.Text = dr["Address"].ToString();
- // StringBuilder content = new StringBuilder();
- // content.AppendFormat("地址:{0}<br/>", dr["Address"]);
- // string point = "";
- // if (dr["lng"].ToString() == "" || dr["lat"].ToString() == "")
- // {
- // point = "117.023732|25.081733";
- // }
- // else
- // {
- // point = dr["lng"] + "|" + dr["lat"];
- // }
- // litScript.Text = "<script>var markerArr = [{ title: \"" + mName + "\", content: \"" + content + "\", point: \"" + point + "\", isOpen: 0 }];initMap();</script>";
- //}
- //else
- //{
- // litScript.Text = "<script>var markerArr = [{ title: \"名称\", content: \"\", point: \"117.023732|25.081733\", isOpen: 0 }];initMap();</script>";
- //}
- string lnglat = GetString("lnglat");
- if (lnglat == "") lnglat = "117.024001|25.08175";
- litScript.Text = "<script>var markerArr = [{ title: \"名称\", content: \"\", point: \""+ lnglat+"\", isOpen: 0 }];initMap();</script>";
- }
- protected void btnSave_Click(object sender, EventArgs e)
- {
- if (hLng.Value == "" || hLat.Value == "")
- {
- ShowMsg("点击地图标记您的位置再保存");
- return;
- }
- string mId = SecurityHelper.UrlDecoding(GetString("iid"));
- try
- {
- //SInst entity = SInst.Get(Convert.ToInt32(mId));
- //entity.Lng = hLng.Value;
- //entity.Lat = hLat.Value;
- //entity.Update();
- ShowMsg("提示", "保存成功", "window.location=window.location.href");
- }
- catch (Exception ex)
- {
- ShowMsg("保存发生错误了!");
- }
- }
- }
|