private void btnSua_Click(object sender, EventArgs e) { maMonHoc = cbbMonHoc.SelectedValue.ToString().Trim(); maSinhVien = cbbSinhVien.SelectedValue.ToString().Trim(); kiHoc = int.Parse(cbbKiHoc.SelectedItem.ToString().Trim()); diemLan1 = float.Parse(txtDiemL1.Text.Trim()); diemLan2 = float.Parse(txtDieml2.Text.Trim()); DTO_Diem Diem = new DTO_Diem(maMonHoc, maSinhVien, kiHoc, diemLan1, diemLan2); try { MessageBox.Show("Bạn đã sửa thành công"); busDien.SuaDiem(maSinhVien, maMonHoc, Diem); dataGridView1.DataSource = busDien.GetDiem(); Xoa(); } catch (Exception A) { MessageBox.Show(A.Message); } }