Exemplo n.º 1
0
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (this.DropDownList1.SelectedValue == "1")
        {
            SysFunc sf    = new SysFunc();
            Area    marea = sf.GetArea(short.Parse(Session["Areaid"].ToString()));

            ReportData rd = new ReportData();
            this.GridView1.DataSource = rd.Show_Report_1(marea);
            this.GridView1.DataBind();
        }
        else if (this.DropDownList1.SelectedValue == "2")
        {
            ReportData rd = new ReportData();
            this.GridView1.DataSource = rd.Show_Report_2(0);
            this.GridView1.DataBind();
        }
        else if (this.DropDownList1.SelectedValue == "3")
        {
            ReportData rd = new ReportData();
            this.GridView1.DataSource = rd.Show_Report_3(0);
            this.GridView1.DataBind();
        }
        else
        {
            this.GridView1.DataSource = null;
            this.GridView1.DataBind();
        }
    }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         SysFunc      sf   = new SysFunc();
         IList <Area> list = new List <Area>();
         if (Session["Type"].ToString() == "0")//my.Type == 0)
         {
             list = sf.GetAreaList(false);
         }
         else
         {
             Area area = sf.GetArea(short.Parse(Session["Areaid"].ToString()));
             if (area.Type == true)
             {
                 list = sf.GetAreaList(area.Cid, false);
             }
             else
             {
                 list.Add(area);
             }
         }
         bind(list);
     }
 }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Areaid"] == null || Session["Type"].ToString() == null)
     {
         Response.Write("<script language='javascript'>alert('请重新登录.'); location.href='Default.aspx'</script>");
     }
     else
     {
         IList <Area> list = new List <Area>();
         SysFunc      sf   = new SysFunc();
         if (Session["Type"].ToString() == "0")
         {
             list = sf.GetAreaList();
         }
         else
         {
             Area area = sf.GetArea(short.Parse(Session["Areaid"].ToString()));
             if (area.Type == true)
             {
                 list = sf.GetAreaList(area.Cid);
             }
             else
             {
                 list.Add(area);
             }
         }
         bind(list);
     }
 }
Exemplo n.º 4
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);
    }
Exemplo n.º 5
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('确认提交?提交后无法更改');";
        }
    }
Exemplo n.º 6
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);
    }
Exemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         IList <Area> list = new List <Area>();
         Members      my   = eu.GetMembers(int.Parse(Session["Userid"].ToString()));
         if (my.Type == 0)
         {
             list = sf.GetAreaList();
         }
         else
         {
             Area area = sf.GetArea(my.Type);
             list.Add(area);
         }
         bind(list);
     }
 }
Exemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         SysFunc      sf   = new SysFunc();
         IList <Area> list = new List <Area>();
         if (Session["Type"] == null)
         {
             Response.Write("<script language='javascript'>alert('连接超时,请重新登录.'); location.href='Loginpage.aspx'</script>");
         }
         else if (Session["Type"].ToString() == "0")//my.Type == 0)
         {
             list = sf.GetAreaList(false);
         }
         else
         {
             if (Session["Areaid"] == null)
             {
                 Response.Write("<script language='javascript'>alert('连接超时,请重新登录.'); location.href='Loginpage.aspx'</script>");
             }
             Area area = sf.GetArea(short.Parse(Session["Areaid"].ToString()));
             if (area.Type == true)
             {
                 list = sf.GetAreaList(area.Cid, false);
             }
             else
             {
                 list.Add(area);
             }
         }
         bind(list);
         bindcate(sf.GetLanCate());
         bindtype(sf.GetLanType());
         bindmaintenance(sf.GetMaintenance());
         bindproperty(sf.GetProperty());
     }
 }
Exemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Type"] == null || Session["Areaid"] == null)
     {
         Response.Write("<script language='javascript'>alert('连接超时,请重新登录.'); location.href='Loginpage.aspx'</script>");
     }
     if (!IsPostBack)
     {
         IList <Area> list = new List <Area>();
         SysFunc      sf   = new SysFunc();
         if (Session["Type"] == null)
         {
             Response.Write("<script language='javascript'>alert('连接超时,请重新登录.'); location.href='Loginpage.aspx'</script>");
         }
         else if (Session["Type"].ToString() == "0")
         {
             list = sf.GetAreaList();
         }
         else
         {
             Area area = sf.GetArea(short.Parse(Session["Areaid"].ToString()));
             if (area.Type == true)
             {
                 list = sf.GetAreaList(area.Cid);
             }
             else
             {
                 list.Add(area);
             }
         }
         bind(list);
         if (Session["curAreaid"] != null)
         {
             this.DropDownList_area.SelectedValue = Session["curAreaid"].ToString();
         }
     }
 }
Exemplo n.º 10
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);
        }
Exemplo n.º 11
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 = "";
            }
        }
    }