示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         SysFunc sf = new SysFunc();
         bindcate(sf.GetLanCate());
         bindtype(sf.GetLanType());
         bindmaintenance(sf.GetMaintenance());
         bindproperty(sf.GetProperty());
         //EpControl ec = new EpControl();
         //this.DropDownList_state.SelectedValue = ec.gethost(landata.ID).STATE.ToString();
     }
     this.Label_fix_tip.Text = "";
 }
示例#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"] == 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());
     }
 }
示例#3
0
 protected void DropDownList_limit_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.DropDownList_type.SelectedValue == "0")
     {
         //ExSysFunction esf = new ExSysFunction();
         //this.DropDownList_linkid.DataSource = esf.ge();
         //this.DropDownList_linkid.DataTextField = "Name";
         //this.DropDownList_linkid.DataValueField = "Id";
         //this.DropDownList_linkid.DataBind();
     }
     else if (this.DropDownList_type.SelectedValue == "1")
     {
         //管理部门
         SysFunc esf = new SysFunc();
         this.TextBox_linkid.Visible             = false;
         this.DropDownList_linkid.Visible        = true;
         this.Label_title.Visible                = true;
         this.Label_title.Text                   = "部门";
         this.DropDownList_linkid.DataSource     = esf.GetFireManageList();
         this.DropDownList_linkid.DataTextField  = "Name";
         this.DropDownList_linkid.DataValueField = "Id";
         this.DropDownList_linkid.DataBind();
     }
     else if (this.DropDownList_type.SelectedValue == "2")
     {
         //战斗部队
         SysFunc esf = new SysFunc();
         this.TextBox_linkid.Visible             = false;
         this.DropDownList_linkid.Visible        = true;
         this.Label_title.Visible                = true;
         this.Label_title.Text                   = "部门";
         this.DropDownList_linkid.DataSource     = esf.GetFireHouseList();
         this.DropDownList_linkid.DataTextField  = "Name";
         this.DropDownList_linkid.DataValueField = "Id";
         this.DropDownList_linkid.DataBind();
     }
     else if (this.DropDownList_type.SelectedValue == "3")
     {
         //监控中心
         SysFunc esf = new SysFunc();
         this.TextBox_linkid.Visible             = false;
         this.DropDownList_linkid.Visible        = true;
         this.Label_title.Visible                = true;
         this.Label_title.Text                   = "部门";
         this.DropDownList_linkid.DataSource     = esf.GetControlCenterList();
         this.DropDownList_linkid.DataTextField  = "Name";
         this.DropDownList_linkid.DataValueField = "Id";
         this.DropDownList_linkid.DataBind();
     }
     else if (this.DropDownList_type.SelectedValue == "4")
     {
         //维护公司
         SysFunc esf = new SysFunc();
         this.TextBox_linkid.Visible             = false;
         this.DropDownList_linkid.Visible        = true;
         this.Label_title.Visible                = true;
         this.Label_title.Text                   = "部门";
         this.DropDownList_linkid.DataSource     = esf.GetMaintenance();
         this.DropDownList_linkid.DataTextField  = "Name";
         this.DropDownList_linkid.DataValueField = "Id";
         this.DropDownList_linkid.DataBind();
     }
     else if (this.DropDownList_type.SelectedValue == "5")
     {
         //物业公司
         SysFunc esf = new SysFunc();
         this.TextBox_linkid.Visible             = false;
         this.DropDownList_linkid.Visible        = true;
         this.Label_title.Visible                = true;
         this.Label_title.Text                   = "部门";
         this.DropDownList_linkid.DataSource     = esf.GetProperty();
         this.DropDownList_linkid.DataTextField  = "Name";
         this.DropDownList_linkid.DataValueField = "Id";
         this.DropDownList_linkid.DataBind();
     }
     else if (this.DropDownList_type.SelectedValue == "6")
     {
         //消防主机
         SysFunc esf = new SysFunc();
         this.TextBox_linkid.Visible      = true;
         this.DropDownList_linkid.Visible = false;
         this.Label_title.Visible         = true;
         this.Label_title.Text            = "HOST_ID";
     }
     else
     {
         //this.Label_type.Text = "未知权限";
     }
 }