private void btnTimKiem_Click(object sender, EventArgs e) { KetNoi_CSDL.TaoKetNoi(); dgrMH.DataSource = null; string sql5 = "Select * from MonHoc where MAMH like '%" + txtTimMH.Text + "%' or TENMH like '%" + txtTimMH.Text + "%' or SOTIET like '%" + txtTimMH.Text + "%'"; dgrMH.DataSource = KetNoi_CSDL.LoadDuLieu(sql5, "MonHoc"); }
private void btnTimKiem_Click(object sender, EventArgs e) { KetNoi_CSDL.TaoKetNoi(); dgrLop.DataSource = null; string sql4 = "Select * from Lop where MALOP like '%" + txtTimLop.Text + "%' or TENLOP like '%" + txtTimLop.Text + "%'"; dgrLop.DataSource = KetNoi_CSDL.LoadDuLieu(sql4, "Lop"); }
private void btnTim_Click(object sender, EventArgs e) { KetNoi_CSDL.TaoKetNoi(); dgrKhoa.DataSource = null; string sql6 = "Select * from Khoa where MAKHOA like '%" + txtTimKhoa.Text + "%' or TENKHOA like '%" + txtTimKhoa.Text + "%'"; dgrKhoa.DataSource = KetNoi_CSDL.LoadDuLieu(sql6, "Khoa"); }
private void Load_Dulieu(object sender, EventArgs e) { dgrMH.DataSource = null; string sql1 = "SELECT * from MonHoc"; dgrMH.DataSource = null; dgrMH.DataSource = KetNoi_CSDL.LoadDuLieu(sql1, "MonHoc"); HienThi_DL(); }
private void btnTimKiem_Click(object sender, EventArgs e) { KetNoi_CSDL.TaoKetNoi(); dgrKetQua.DataSource = null; string sql1 = "Select * from SinhVien where MASV like '%" + txtTimKiemSV.Text + "%' or TENSV like '%" + txtTimKiemSV.Text + "%' or SDT like '%" + txtTimKiemSV.Text + "%'"; //string sql1 = "Select * from User where USERNAME like '%"+txtTimKiemSV.Text+"%'"; dgrKetQua.DataSource = KetNoi_CSDL.LoadDuLieu(sql1, "SinhVien"); }
private void Load_Dulieu(object sender, EventArgs e) { dgrDSSV.DataSource = null; string sql1 = "SELECT * from SinhVien"; dgrDSSV.DataSource = null; dgrDSSV.DataSource = KetNoi_CSDL.LoadDuLieu(sql1, "SinhVien"); HienThi_DL(); }