private void btnLuu_Click(object sender, EventArgs e) { try { BangDiem bd = GetInputForm(); // them if (IsThem == 1) { BangDiem.Them(bd); ResetData(); // reset data } else { // sua BangDiem.Sua(bd); IsThem = Them; ResetData(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }