string username = this.txtUserName.Value.Trim();
        string password = this.txtPassword.Text.Trim();
        ////重构登陆方法
        DataTable dt = UsersBLL.Select用户职能部门名称(username, password);
        DDL职能部门名称.DataSource = dt;
        DDL职能部门名称.DataTextField = "职能部门名称";
        DDL职能部门名称.DataValueField = "职能部门名称";
        DDL职能部门名称.DataBind();
        ///第一个选项无法触发事件,添加以下代码可以解决
        ListItem item = new ListItem();
        item.Text = "--请选择--";
        item.Value = "-1";
        DDL职能部门名称.Items.Insert(0, item);

相关文章:

  • 2021-11-24
  • 2021-08-26
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-06-29
  • 2021-12-03
猜你喜欢
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2021-06-14
  • 2021-06-02
  • 2021-10-06
相关资源
相似解决方案