135 lines
4.8 KiB
C#
135 lines
4.8 KiB
C#
using System;
|
|
using System.Data;
|
|
using Business = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
using HZQR.Common;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Modules.MapShow
|
|
{
|
|
public partial class Default : SuperMap.RealEstate.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.Master_SizeBox.SideBar.Width = "300";
|
|
this.Master_SizeBox.SideBar.Background = "#fff";
|
|
if (IsPostBack) return;
|
|
|
|
//销售排名
|
|
ButtonServerpartRank.OnClientClick = this.GetOpenPopDialogClientScript(
|
|
"ServerpartRank.aspx", "ServerpartRank", 1000, 800);
|
|
ButtonServerpartShopRank.OnClientClick = this.GetOpenPopDialogClientScript(
|
|
"ServerpartShopRank.aspx", "ServerpartShopRank", 1000, 800);
|
|
//在售商品情况
|
|
ButtonCommodityRank.OnClientClick = this.GetOpenPopDialogClientScript(
|
|
"CommodityRank.aspx", "CommodityRank", 1000, 800);
|
|
//稽核数据
|
|
ButtonServerPartMachine.OnClientClick = this.GetOpenPopDialogClientScript(
|
|
"CurRevenue.aspx", "CurRevenue", 1000, 800);
|
|
}
|
|
|
|
|
|
public string GetTypeString
|
|
{
|
|
get
|
|
{
|
|
string PartString = string.Empty;
|
|
//获得第一级数据
|
|
foreach (Business.SERVERPARTTYPE _SERVERPARTTYPE in (new Business.SERVERPARTTYPE(this.Transaction).FillCollection(
|
|
"WHERE ISMAP=1 AND TYPE_PID = -1 ORDER BY TYPE_INDEX")))
|
|
{
|
|
//名称 + 内码加密 + 图标
|
|
PartString += (PartString == "" ? "" : ",") + _SERVERPARTTYPE.TYPE_NAME + "|" +
|
|
_SERVERPARTTYPE.SERVERPARTTYPE_ID_Encrypt + "|" + _SERVERPARTTYPE.MAP_ICON + "|" +
|
|
_SERVERPARTTYPE.SETUPPOINT;
|
|
}
|
|
return PartString;
|
|
}
|
|
}
|
|
|
|
public string GetBaiduPointString()
|
|
{
|
|
DataTable _DataTable = new DataTable();
|
|
_DataTable.Columns.Add("MAPINFO");
|
|
_DataTable.Columns.Add("MAP_ADDRESS");
|
|
_DataTable.Columns.Add("MAP_TEL");
|
|
_DataTable.Columns.Add("MAP_OBJECTCODE");
|
|
_DataTable.Columns.Add("MAPX");
|
|
_DataTable.Columns.Add("MAPY");
|
|
try
|
|
{
|
|
//获得服务区数据
|
|
string PartString = string.Empty;
|
|
//获得服务区信息
|
|
foreach (Business.SERVERPART _SERVERPART in (new Business.SERVERPART(this.Transaction)).FillCollection(
|
|
"where 1=1"))
|
|
{
|
|
DataRow _DataRow = _DataTable.NewRow();
|
|
_DataRow["MAPINFO"] = _SERVERPART.SERVERPART_NAME + " " + _SERVERPART.SERVERPART_INFO;
|
|
_DataRow["MAP_ADDRESS"] = _SERVERPART.SERVERPART_ADDRESS;
|
|
_DataRow["MAP_TEL"] = _SERVERPART.SERVERPART_TEL;
|
|
_DataRow["MAP_OBJECTCODE"] = _SERVERPART.SERVERPART_ID_Encrypt;
|
|
//去除掉西充
|
|
if (_SERVERPART.SERVERPART_X == null)
|
|
continue;
|
|
_DataRow["MAPX"] = _SERVERPART.SERVERPART_X;
|
|
_DataRow["MAPY"] = _SERVERPART.SERVERPART_Y;
|
|
_DataTable.Rows.Add(_DataRow);
|
|
}
|
|
|
|
string PointString = string.Empty;
|
|
PointString = BaiDuMapHelper.GetBaiduPointString(PointString, _DataTable);
|
|
return PointString;
|
|
}
|
|
catch
|
|
{
|
|
return "";
|
|
}
|
|
}
|
|
|
|
public string GetPointX
|
|
{
|
|
get
|
|
{
|
|
try
|
|
{
|
|
return "120.170291";
|
|
//if (this.CurrObject.SERVERPART_X == null)
|
|
//{
|
|
// return "120.170291";
|
|
//}
|
|
//else
|
|
//{
|
|
// return this.CurrObject.SERVERPART_X.ToString();
|
|
//}
|
|
}
|
|
catch
|
|
{
|
|
return "120.170291";
|
|
}
|
|
}
|
|
}
|
|
|
|
public string GetPointY
|
|
{
|
|
get
|
|
{
|
|
try
|
|
{
|
|
return "30.306109";
|
|
//if (this.CurrObject.SERVERPART_Y == null)
|
|
//{
|
|
// return "30.306109";
|
|
//}
|
|
//else
|
|
//{
|
|
// return this.CurrObject.SERVERPART_Y.ToString();
|
|
//}
|
|
}
|
|
catch
|
|
{
|
|
return "30.306109";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|