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_ShowMap : 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}
", dr["Address"]);
// string point = "";
// if (dr["lng"].ToString() == "" || dr["lat"].ToString() == "")
// {
// point = "117.023732|25.081733";
// }
// else
// {
// point = dr["lng"] + "|" + dr["lat"];
// }
// litScript.Text = "";
//}
//else
//{
// litScript.Text = "";
//}
string lnglat = GetString("lnglat");
if (lnglat == "") lnglat = "117.024001|25.08175";
string ad = GetString("ad");
if (ad == "") ad = "地点";
litScript.Text = "";
}
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("保存发生错误了!");
}
}
}