private void frmChonkhoa_Load(object sender, System.EventArgs e) { user = ttb.user; makho.DisplayMember = "TEN"; makho.ValueMember = "ID"; string sql = "select * from " + user + ".ttb_dmkho where nhom=" + i_nhom; if (s_makho != "") { sql += " and id in (" + s_makho.Substring(0, s_makho.Length - 1) + ")"; } sql += " order by stt"; makho.DataSource = ttb.get_data(sql).Tables[0]; if (makho.Items.Count > 0) { makho.SelectedIndex = 0; } makp.DisplayMember = "TEN"; makp.ValueMember = "ID"; sql = "select * from " + d.user + ".d_duockp where nhom like '%" + i_nhom.ToString() + ",%'"; if (s_makp != "") { sql += " and id in (" + s_makp.Substring(0, s_makp.Length - 1) + ")"; } sql += " order by stt"; dtkhoa = d.get_data(sql).Tables[0]; ttb.convertFont(dtkhoa, "ten"); makp.DataSource = dtkhoa; if (makp.Items.Count > 0) { makp.SelectedIndex = 0; } }