Example #1
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            int indice        = (int)grillaCliente.CurrentRow.Cells[0].Value;
            var listaFamilias = _clienteBll.ListarClientes();

            BE.Cliente _cliente = listaFamilias.Where(i => i.Id == indice).FirstOrDefault();
            try
            {
                _clienteBll.EliminarCliente(_cliente);
                MessageBox.Show("Cliente eliminado correctamente");
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
            }

            ActualizarGrilla();
        }