private void txtMaSach_TextChanged(object sender, EventArgs e) { if (SachBUS.DanhSachSachTheoMa(txtMaSach.Text).Rows.Count > 0) { foreach (DataRow row in SachBUS.DanhSachSachTheoMa(txtMaSach.Text).Rows) { txtTenSach.Text = row["TenSach"].ToString(); txtGiaBan.Text = row["GiaBan"].ToString(); } } else { txtTenSach.ResetText(); txtGiaBan.ResetText(); } }