private void Load_DuLieu(object sender, EventArgs e) { string sql1 = "Select * from QLTTB"; dataTB.DataSource = null; dataTB.DataSource = KetNoiCSDL_TB.LoadDuLieu(sql1, "QLTTB"); }
private void btn_timkiem_Click(object sender, EventArgs e) { KetNoiCSDL_TB.TaoKetNoi_CSDL(); grdtimkiem.DataSource = null; string sql1 = "Select * from QLTTB where MA_PHONG like '" + txt_timkiem.Text + "' or MA_LOAITB like '" + txt_timkiem.Text + "' or TEN_TB like '%" + txt_timkiem.Text + "%' or SO_LUONG like '" + txt_timkiem.Text + "'"; grdtimkiem.DataSource = KetNoiCSDL_TB.LoadDuLieu(sql1, "QLTTB"); }
private void load(object sender, EventArgs e) { string sql = "SELECT * from TKB"; grd_tkb.DataSource = null; grd_tkb.DataSource = ketnoiCSDL_TKB.laydl(sql, "TKB"); string SQL = "Select * from LOP"; grd_lop.DataSource = null; grd_lop.DataSource = KeyNoiCSDL_LOP.LoadDuLieu(SQL, "LOP"); string SQL1 = "Select * from QLTTB"; grd_TB.DataSource = null; grd_TB.DataSource = KetNoiCSDL_TB.LoadDuLieu(SQL1, "QLTTB"); string SQL2 = "Select * from ROOM"; grd_room.DataSource = null; grd_room.DataSource = KETNOICSDL_ROOM.laydulieu(SQL2, "ROOM"); }