private void txtSearch_TextChanged(object sender, EventArgs e) { if (txtSearch.Text != "") { if (cLogin.search == 0) { dataGridView1.DataSource = db.SearchMTMaThe(txtSearch.Text); } else if (cLogin.search == 1) { dataGridView1.DataSource = db.SearchMTMaCuon(txtSearch.Text); } else if (cLogin.search == 2) { dataGridView1.DataSource = db.SearchMTMaNV(txtSearch.Text); } else if (cLogin.search == 3) { dataGridView1.DataSource = db.SearchMTNgayMuon(txtSearch.Text); } else { dataGridView1.DataSource = db.SearchMTNgayTra(txtSearch.Text); } } else { LoadData(); } }