zoukankan      html  css  js  c++  java
  • combobox联动

     
     1  private void w_day_scheduling_Load(object sender, EventArgs e)
     2         {
     3            
     4             if (ls_deptname == string.Empty)
     5             {
     6                 ds = DoctorService.getDdept();
     7                 comboBoxEx1.DataSource = ds.Tables[0];
     8                 comboBoxEx1.DisplayMember = "group_name";
     9                 comboBoxEx1.SelectedIndex = 0;
    10                 comboBoxEx1.ValueMember = "group_code";
    11                 ds.Dispose();
    12             }
    13         }
    View Code
     1  private void comboBoxEx1_SelectedIndexChanged(object sender, EventArgs e)
     2         {
     3             if (comboBoxEx1.SelectedIndex > -1)
     4             {
     5                 DataRowView drv = (DataRowView)comboBoxEx1.SelectedItem;
     6                 string  ls_deptcode = drv.Row["group_code"].ToString();
     7                 ds = DoctorService.getNoClass(ls_deptcode);
     8                 comboBoxEx2.DataSource = ds.Tables[0];
     9                 comboBoxEx2.DisplayMember = "CLINIC_LABEL";
    10             }
    11         }
    View Code
  • 相关阅读:
    poj 2155 B
    hdu 1556 A
    hdu 1556 A
    #366 A-C
    最长上升子序列
    Codeforces Div3 #501 A-E(2) F以后补
    字典的建立 查找
    字典序大小
    头文件模板
    01背包模板 及 优化
  • 原文地址:https://www.cnblogs.com/lvk618/p/3710677.html
Copyright © 2011-2022 走看看