Example #1
0
        private void btn_eliminar_Click(object sender, EventArgs e)
        {
            errorProvider1.Clear();

            int id;

            int.TryParse(IdnumericUpDown1.Text, out id);

            Limpiar();

            if (RolesBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                errorProvider1.SetError(IdnumericUpDown1, "Rol no existe");
            }
        }