private void cbo_indexchanged() { if (MaHD.Length == 6) { if (bd.LuuHoadon(ref err, MaHD, cls_Main.MaNV, MaMon)) { DataTable dt = new DataTable(); dt = bd.Laydanhsachhangdangban(mahd); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["MaMon"].ToString() == MaMon) { index = Convert.ToInt16(dt.Rows[i]["STT"]) - 1; } } laydulieuhangdangban(MaHD); } } }