private void btn_timkiemlop_Click(object sender, EventArgs e) { KeyNoiCSDL_LOP.KetNoi_CSDL(); grdtimkiem.DataSource = null; string sql2 = "SELECT * FROM LOP WHERE MA_LOP like'" + txt_timkiem.Text + "' or TEN_LOP like '%" + txt_timkiem.Text + "%' or MA_GV like '" + txt_timkiem.Text + "'"; grdtimkiem.DataSource = KeyNoiCSDL_LOP.LoadDuLieu(sql2, "LOP"); }
private void btntimkiem_Click(object sender, EventArgs e) { frmtimkiem_lop f3 = new frmtimkiem_lop(); f3.Show(); KeyNoiCSDL_LOP.KetNoi_CSDL(); DataGvLop.DataSource = null; }
private void Load_DuLieu(object sender, EventArgs e) { DataGvLop.DataSource = null; string SQL = "Select * from LOP"; DataGvLop.DataSource = null; DataGvLop.DataSource = KeyNoiCSDL_LOP.LoadDuLieu(SQL, "LOP"); HienThi_DL(); }
private void btnchendl_Click(object sender, EventArgs e) { try { string c = txtmalop.Text; string d = txttenlop.Text; string b = txtmagv.Text; KeyNoiCSDL_LOP.chendl(c, d, b); Load_DuLieu(null, null); HienThi_DL(); } catch (OleDbException Exception) { String a = Convert.ToString(Exception.ErrorCode); MessageBox.Show(a); } }
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"); }
private void btnxoadl_Click(object sender, EventArgs e) { KeyNoiCSDL_LOP.xoadl(txtmalop.Text); Load_DuLieu(null, null); HienThi_DL(); }