Beispiel #1
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 = "未知权限";
     }
 }