private void Eliminar_button_Click(object sender, EventArgs e) { errorProvider.Clear(); int id; int.TryParse(InscripcionId_numericUpDown.Text, out id); try { if (InscripcionBLL.Eliminar(id)) { InscripcionBLL.Descontar(Detalle[0].EstudianteId, decimal.Parse(Monto_textBox.Text)); Limpiar(); MessageBox.Show("Eliminado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("No se puede eliminar esta Inscripción", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception) { MessageBox.Show("No se pudo eliminar"); } }