Пример #1
0
    protected void Button_search_Click(object sender, EventArgs e)
    {
        this.U_landdata1.Visible = false;
        IList <LanData> lanlist     = new List <LanData>();
        SysFunc         sf          = new SysFunc();
        UseFunc         uf          = new UseFunc();
        Area            currentarea = sf.GetArea(short.Parse(Session["Areaid"].ToString()));

        if (Session["Type"].ToString() == "0")  // 超级权限
        {
            lanlist = uf.GetLandataList(this.TextBox_key.Text);
            //lanlist = uf.GetLandataList();
        }
        else
        {
            if (currentarea.Type == true)
            {
                IList <Area> areas = sf.GetAreaList(currentarea.Cid, false);
                for (int i = 0; i < areas.Count; i++)
                {
                    IList <LanData> tmp = uf.GetLandataList(this.TextBox_key.Text, areas[i].ID);
                    for (int j = 0; j < tmp.Count; j++)
                    {
                        lanlist.Add(tmp[j]);
                    }
                }
            }
            else
            {
                lanlist = uf.GetLandataList(this.TextBox_key.Text, short.Parse(Session["Areaid"].ToString()));
            }
        }
        bindlist(lanlist);
    }
Пример #2
0
    //ExUserFunction eu = new ExUserFunction();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Areaid"] == null || Session["LinkId"] == null || Session["Type"] == null)
        {
            Response.Write("<script language='javascript'>alert('连接超时,请重新登录.'); location.href='Loginpage.aspx'</script>");
        }
        else
        {
            short type = short.Parse(Session["Type"].ToString());
            if (type != 0 && type != 3 && type != 1 && type != 6)
            {
                Response.Write("<script language='javascript'>alert('该账号无此操作权限.'); location.href='HomePage.aspx'</script>");
                return;
            }
            if (!IsPostBack)
            {
                this.U_landdata1.Visible = false;
                IList <LanData> lanlist     = new List <LanData>();
                SysFunc         sf          = new SysFunc();
                UseFunc         uf          = new UseFunc();
                Area            currentarea = sf.GetArea(short.Parse(Session["Areaid"].ToString()));
                int             linkid      = int.Parse(Session["LinkId"].ToString());
                if (type == 0)  // 超级权限
                {
                    lanlist = uf.GetLandataList();
                }
                else if (type == 6)
                {
                    lanlist.Add(uf.GetLandata(short.Parse(Session["LinkId"].ToString())));
                }
                else
                {
                    if (currentarea.Type == true)
                    {
                        IList <Area> areas = sf.GetAreaList(currentarea.Cid, false);
                        for (int i = 0; i < areas.Count; i++)
                        {
                            IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                            for (int j = 0; j < tmp.Count; j++)
                            {
                                lanlist.Add(tmp[j]);
                            }
                        }
                    }
                    else
                    {
                        lanlist = uf.GetLandataList(currentarea.ID);
                    }
                }
                bindlist(lanlist);
            }
            //this.Button_back.Attributes["onclick"] = "javascript:location.href='HomePage.aspx'";
            //this.ImageButton_submit.Attributes["onclick"] = "javascript:return confirm('确认提交?提交后无法更改');";
        }
    }
Пример #3
0
    private IList <LanData> get_my_lanlist()
    {
        IList <LanData> landatalist = new List <LanData>();
        SysFunc         sf          = new SysFunc();
        UseFunc         uf          = new UseFunc();
        Area            currentarea = sf.GetArea(short.Parse(Session["curAreaid"].ToString()));
        short           type        = short.Parse(Session["Type"].ToString());

        if (type == 0)  // 超级权限
        {
            landatalist = uf.GetLandataList();
        }
        else if (type == 6)
        {
            landatalist.Add(uf.GetLandata(short.Parse(Session["LinkId"].ToString())));
        }
        else if (type == 5)
        {
            landatalist = uf.GetLandataListPt(short.Parse(Session["LinkId"].ToString()));
        }
        else if (type == 4)
        {
            landatalist = uf.GetLandataListMt(short.Parse(Session["LinkId"].ToString()));
        }
        else
        {
            if (currentarea.Type == true)
            {
                IList <Area> areas = sf.GetAreaList(currentarea.Cid, false);
                for (int i = 0; i < areas.Count; i++)
                {
                    IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                    for (int j = 0; j < tmp.Count; j++)
                    {
                        landatalist.Add(tmp[j]);
                    }
                }
                //landatalist = eu.getLandatalist_by_areaid(short.Parse(Session["Areaid"].ToString()));
            }
            else
            {
                landatalist = uf.GetLandataList(currentarea.ID);
            }
        }
        return(landatalist);
    }
Пример #4
0
        /// <summary>
        /// 获取可见大楼信息
        /// </summary>
        /// <param name="mb">用户信息</param>
        /// <returns></returns>
        public IList <LanData> getbuildings(string mid)
        {
            SysFunc         sf          = new SysFunc();
            UseFunc         uf          = new UseFunc();
            Members         mb          = uf.GetMembers(int.Parse(mid));
            IList <LanData> landatalist = new List <LanData>();

            if (mb.Type == 0)  // 超级权限
            {
                landatalist = uf.GetLandataList();
            }
            else if (mb.Type == 1)
            {
                Area curArea = sf.GetArea((short)sf.GetFireManage((short)mb.LinkId).Aid);
                if (curArea.Type == true)
                {
                    IList <Area> areas = sf.GetAreaList(curArea.Cid, false);
                    for (int i = 0; i < areas.Count; i++)
                    {
                        IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                        for (int j = 0; j < tmp.Count; j++)
                        {
                            landatalist.Add(tmp[j]);
                        }
                    }
                }
                else
                {
                    landatalist = uf.GetLandataList(curArea.ID);
                }
            }
            else if (mb.Type == 2)
            {
                Area curArea = sf.GetArea((short)sf.GetFireHouse((short)mb.LinkId).Aid);
                if (curArea.Type == true)
                {
                    IList <Area> areas = sf.GetAreaList(curArea.Cid, false);
                    for (int i = 0; i < areas.Count; i++)
                    {
                        IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                        for (int j = 0; j < tmp.Count; j++)
                        {
                            landatalist.Add(tmp[j]);
                        }
                    }
                }
                else
                {
                    landatalist = uf.GetLandataList(curArea.ID);
                }
            }
            else if (mb.Type == 3)
            {
                Area curArea = sf.GetArea((short)sf.GetControlCenter((short)mb.LinkId).Aid);
                if (curArea.Type == true)
                {
                    IList <Area> areas = sf.GetAreaList(curArea.Cid, false);
                    for (int i = 0; i < areas.Count; i++)
                    {
                        IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                        for (int j = 0; j < tmp.Count; j++)
                        {
                            landatalist.Add(tmp[j]);
                        }
                    }
                }
                else
                {
                    landatalist = uf.GetLandataList(curArea.ID);
                }
            }
            else if (mb.Type == 6)
            {
                landatalist.Add(uf.GetLandata((int)mb.LinkId));
            }
            else if (mb.Type == 5)
            {
                landatalist = uf.GetLandataListPt((short)mb.LinkId);
            }
            else if (mb.Type == 4)
            {
                landatalist = uf.GetLandataListMt((short)mb.LinkId);
            }
            else
            {
                landatalist = null;
            }
            return(landatalist);
        }
Пример #5
0
    //private ExUserFunction eu = new ExUserFunction();
    //private LbsMaker lm = new LbsMaker();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["curAreaid"] == null || Session["LinkId"] == null || Session["Type"] == null)
        {
            Response.Write("<script language='javascript'>alert('请重新登录.'); location.href='Loginpage.aspx'</script>");
        }
        if (!IsPostBack)
        {
            IList <LanData> landatalist = new List <LanData>();
            SysFunc         sf          = new SysFunc();
            UseFunc         uf          = new UseFunc();
            Area            currentarea = sf.GetArea(short.Parse(Session["curAreaid"].ToString()));
            short           type        = short.Parse(Session["Type"].ToString());
            if (type == 0)  // 超级权限
            {
                landatalist = uf.GetLandataList();
            }
            else if (type == 6)
            {
                landatalist.Add(uf.GetLandata(int.Parse(Session["LinkId"].ToString())));
            }
            else if (type == 5)
            {
                landatalist = uf.GetLandataListPt(short.Parse(Session["LinkId"].ToString()));
            }
            else if (type == 4)
            {
                landatalist = uf.GetLandataListMt(short.Parse(Session["LinkId"].ToString()));
            }
            else
            {
                if (currentarea.Type == true)
                {
                    IList <Area> areas = sf.GetAreaList(currentarea.Cid, false);
                    for (int i = 0; i < areas.Count; i++)
                    {
                        IList <LanData> tmp = uf.GetLandataList(areas[i].ID);
                        for (int j = 0; j < tmp.Count; j++)
                        {
                            landatalist.Add(tmp[j]);
                        }
                    }
                    //landatalist = eu.getLandatalist_by_areaid(short.Parse(Session["Areaid"].ToString()));
                }
                else
                {
                    landatalist = uf.GetLandataList(currentarea.ID);
                }
            }

            // 读取数据,制造地图
            if (landatalist.Count() > 0)
            {
                this.Label_notic.Text = "";
                string gpscenter = currentarea.Lng + "," + currentarea.Lat;
                string zoom      = currentarea.Zoom.ToString();
                // 如果选择全部城区,则生成热力图
                if (currentarea.Type == true)
                {
                    //标记指标点

                    this.Literal_map.Text = LbsMaker.MakeMap(gpscenter, zoom, LbsMaker.MakeMapPoints(landatalist));

                    //区域标签
                    //this.Literal_map.Text = LbsMaker.MakeLabel(currentarea.GpsCenter, zoom, LbsMaker.MakeLabelPoints(landatalist, eu.getArea_All(true)));

                    //热力图
                    //this.Literal_map.Text = LbsMaker.MakeHeat(currentarea.GpsCenter, zoom, LbsMaker.MakeHeatPoints(landatalist));
                }
                else
                {
                    this.Literal_map.Text = LbsMaker.MakeMap(gpscenter, zoom, LbsMaker.MakeMapPoints(landatalist));
                }
            }
            else
            {
                this.Label_notic.Text = "暂无数据,请选择其他区域";
                this.Literal_map.Text = "";
            }
        }
    }