Beispiel #1
0
        private void laykhu()
        {
            DataTable dta = new DataTable();

            dta = bd.LayKhu("A");

            cbo_khuA.DataSource    = dta;
            cbo_khuA.ValueMember   = "Khu";
            cbo_khuA.DisplayMember = "Khu";

            DataTable dtb = new DataTable();

            dtb = bd.LayKhu("B");

            cbo_KhuB.DataSource    = dtb;
            cbo_KhuB.ValueMember   = "Khu";
            cbo_KhuB.DisplayMember = "Khu";
            DataTable dtc = new DataTable();

            dtc = bd.LayKhu("C");

            cbo_KhuC.DataSource    = dtc;
            cbo_KhuC.ValueMember   = "Khu";
            cbo_KhuC.DisplayMember = "Khu";

            cbo_khuA.SelectedIndex = -1;
            cbo_KhuB.SelectedIndex = -1;
            cbo_KhuC.SelectedIndex = -1;
        }