Exemple #1
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());
     }
 }