private void btn_Salvar_Click(object sender, EventArgs e) { try { double nota = Convert.ToDouble(txt_Nota.Text); aluno.AdicionarNota(nota); this.DialogResult = DialogResult.OK; Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void CadastrarNota() { try { double nota = Convert.ToDouble(txtNota.Text); aluno.AdicionarNota(nota); this.DialogResult = DialogResult.OK; Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }