private void button15_Click(object sender, EventArgs e) { int magv; string malop; magv = int.Parse(txtgv.Text.Trim()); malop = txtlh.Text.Trim(); GV_LH sh = new GV_LH(magv, malop); try { int i = new GV_LHBUS().SuaGV_LH(sh); if (i == -2) { throw new Exception(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } dgvGV_LH.DataSource = GetGV_LH(); }
private void button14_Click(object sender, EventArgs e) { int magv; string malh; magv = int.Parse(txtgv.Text.Trim()); malh = txtlh.Text.Trim(); try { int i = new GV_LHBUS().XoaGV_LH(magv, malh); } catch (Exception ex) { MessageBox.Show(ex.Message); } dgvGV_LH.DataSource = GetGV_LH(); }