string stype = ddlType.SelectedItem.Text;
            string strsql = "";
            switch (stype)
            {
                case "学号":
                    strsql = "select * from tb_Student where StudentNum like '%" + txtKey.Text.Trim() + "%'";
                    BaseClass.BindDG(gvStuInfo, "ID", strsql, "stuinfo"); ;
                    break;
                case "姓名":
                    strsql = "select * from tb_Student where StudentName like '%" + txtKey.Text.Trim() + "%'";
                    BaseClass.BindDG(gvStuInfo, "ID", strsql, "stuinfo");
                    break;
            }

相关文章:

  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2022-12-30
  • 2022-12-23
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
相关资源
相似解决方案