private void btntim_Click(object sender, EventArgs e) { if (radioButton1.Checked) { TaiLieu tl = new TaiLieu(); dataGridView1.DataSource = tl.timtheoma(matailieu, txttimkiem.Text); } else if (radioButton2.Checked) { TaiLieu tl = new TaiLieu(); dataGridView1.DataSource = tl.timtheoten(matailieu, txttimkiem.Text); } else { MessageBox.Show("Chưa có dữ liệu!"); } }