Ejemplo n.º 1
0
        private void BtnEliminar_Click(object sender, EventArgs e)
        {
            EmpleadoNegocio neg = new EmpleadoNegocio();
            Empleado        em  = (Empleado)dgvEmpleados.CurrentRow.DataBoundItem;

            try
            {
                using (var popup = new Confirmacion(@"eliminar """ + em.ToString() + @""""))
                {
                    var R = popup.ShowDialog();
                    if (R == DialogResult.OK)
                    {
                        bool conf = popup.R;
                        if (em != null && conf == true)
                        {
                            neg.EliminarLogico(em.IdEmpleado);
                            LlenarTabla();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Mensaje m = new Mensaje(ex.ToString()); m.ShowDialog();
            }
        }