Example #1
0
        private void btnEliminar_Click(object sender, RoutedEventArgs e)
        {
            int     id      = 0;
            Persona persona = new Persona();

            try {
                id = Convert.ToInt32(tbID.Text);
            } catch (Exception) {
                MessageBox.Show("El ID debe ser un numero");
                tbID.Focus();
                return;
            }

            persona = PersonasBLL.Buscar(id);

            if (persona != null)
            {
                MessageBoxResult messageBoxResult = MessageBox.Show("Desea eliminar esta persona?", "Atención", MessageBoxButton.YesNo, MessageBoxImage.Question);
                if (messageBoxResult == MessageBoxResult.Yes)
                {
                    PersonasBLL.Eliminar(id);
                    MessageBox.Show("Persona Eliminada.");
                }
            }
            else
            {
                MessageBox.Show("Esta Persona no existe");
            }
        }
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(txtNombre.Text))
            {
                MessageBox.Show("Error, no hay Clientes para Eliminar");
            }

            //if //(txtCedula.Text!= null)
            else
            {
                DialogResult dialogo = MessageBox.Show("¿Deseas borrar este Cliente?", " Borrando usuario de la base de datos", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (dialogo == DialogResult.Yes)
                {
                    int PersonaId = Convert.ToInt32(txtId.Text);
                    PersonasBLL.Eliminar(PersonaId);
                    txtId.Clear();
                    txtCedula.Clear();
                    txtNombre.Clear();
                    txtApellidos.Clear();
                    txtDireccion.Clear();
                    txtCorreo.Clear();
                    txtTelefono.Clear();

                    MessageBox.Show("! Cliente Eliminado !", MessageBoxOptions.ServiceNotification.ToString());
                }
            }
        }
        public void EliminarTest()
        {
            bool HayErrores = false;

            HayErrores = PersonasBLL.Eliminar(5);
            Assert.AreEqual(HayErrores, true);
        }
        public void EliminarTest()
        {
            bool paso = false;

            paso = PersonasBLL.Eliminar(1);
            Assert.AreNotEqual(paso, false);
        }
        public void EliminarTest()
        {
            bool paso;

            paso = PersonasBLL.Eliminar(2);
            Assert.AreEqual(paso, true);
        }
        public void EliminarTest()
        {
            int  id = 3;
            bool paso;

            paso = PersonasBLL.Eliminar(id);
            Assert.AreEqual(paso, true);
        }
Example #7
0
 private void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(persona.PersonaId))
     {
         MessageBox.Show("Eliminado");
     }
     else
     {
         MessageBox.Show("si no existe no se puede eliminar");
     }
 }
 private void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(Convert.ToInt32(PersonaIdTextBox.Text)))
     {
         Limpiar();
         MessageBox.Show("Se eliminó exitosamente.", "¡Exito!", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("No se pudo eliminar la persona.", "¡Fallo!", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
//-----------------------BOTON ELIMINAR------------------------------
        private void ButtonEliminar_Click(object sender, RoutedEventArgs e)
        {
            if (PersonasBLL.Eliminar(Convert.ToInt32()))
            {
                Limpiar();
                MessageBox.Show("Eliminado", "Exito", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                MessageBox.Show("No fue posible eliminar", "Fallo", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Example #10
0
 private void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(persona.PersonaId))
     {
         MessageBox.Show("Eliminado");
         Limpiar();
     }
     else
     {
         MessageBox.Show("No se pudo eliminar una persona que no existe");
     }
 }
 private void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(Utilidades.ToInt(PersonaIdTextBox.Text)))
     {
         Limpiar();
         MessageBox.Show("Registro eliminado!", "Exito", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("No fue posible eliminar", "Fallo", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Example #12
0
 private void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(Convert.ToInt32(PrestamoIDTextBox.Text)))
     {
         MessageBox.Show("Se elimino correctamente!");
         Limpiar();
     }
     else
     {
         MessageBox.Show("Lo sentimos no se pudo Eliminar");
     }
 }
 private void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(Convert.ToInt32(PersonaIdTextBox.Text)))
     {
         MessageBox.Show("Persona eliminada");
         Limpiar();
     }
     else
     {
         MessageBox.Show("no se puede eliminar una Persona que no existe");
     }
 }
Example #14
0
        public ActionResult Delete(int id)
        {
            if (PersonasBLL.Buscar(id) != null)
            {
                PersonasBLL.Eliminar(id);
            }
            else
            {
                return(NotFound());
            }

            return(NoContent());
        }
Example #15
0
        private void EliminarButton_Click(object sender, EventArgs e)
        {
            if (PersonasBLL.Eliminar((int)IDNumericUpDown.Value))
            {
                MessageBox.Show("Se elimino la persona");
            }
            else
            {
                MessageBox.Show("No se pudo eliminar esta persona");
            }

            LimpiarTextBox();
        }
        public void EliminarTest()
        {
            Personas personas = new Personas();
            bool     paso     = false;

            personas.PersonaId = 1;

            int id = Convert.ToInt32(personas.PersonaId);

            paso = PersonasBLL.Eliminar(id);

            Assert.AreEqual(paso, true);
        }
 public void EliminarBoton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(Utilities.ToInt(PersonaIDTextBox.Text)))
     {
         Limpiar();
         MessageBox.Show("Registro borrado", "Borrado exitoso",
                         MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("Error", "Hubo un error al borrar",
                         MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Example #18
0
        public void EliminarTest()
        {
            bool     paso;
            Personas persona = new Personas();

            persona.PersonaId = 0;
            persona.Nombre    = "prueba";
            persona.Cedula    = "40215682997";
            persona.Direccion = "cotui";
            persona.Telefono  = "8096578942";
            persona.Balance   = 0;
            paso = PersonasBLL.Eliminar(persona.PersonaId);
            Assert.AreEqual(paso, false);
        }
Example #19
0
        private void EliminarButton_Click(object sender, RoutedEventArgs e)
        {
            Validar.ValidarEntero(IdTextBox.Text);
            Limpiar();

            if (PersonasBLL.Eliminar(Validar.ValidarEntero(IdTextBox.Text)))
            {
                MessageBox.Show("Eliminado", "Exito", MessageBoxButton.OK);
            }
            else
            {
                MessageBox.Show("No se puede eliminar una persona que no existe");
            }
        }
 private void btnEliminar_Click(object sender, EventArgs e)
 {
     if (IDPersonaNumericUpDown.Value > 0)
     {
         if (PersonasBLL.Eliminar(Convert.ToInt32(IDPersonaNumericUpDown.Value)) == true)
         {
             MessageBox.Show("Registro eliminado correctamente!!!");
         }
         else
         {
             MessageBox.Show("Error al intentar eliminar el registro!!!");
         }
     }
 }
 public void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PersonasBLL.Eliminar(Convert.ToInt32(IdTextBox.Text)))
     {
         Limpiar();
         MessageBox.Show("Transaccion exitosa!", "Exito",
                         MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("Transaccion Fallida", "Fallo",
                         MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Example #22
0
        private void EliminarButton_Click(object sender, EventArgs e)
        {
            int ID = int.Parse(IDNumericUpDown.Text);

            if (PersonasBLL.Eliminar(ID))
            {
                MessageBox.Show("Tipo de Persona Eliminada");
            }
            else
            {
                errorProvider1.SetError(EliminarButton, "No se puede eliminar un Tipo de Persona que no existe");
            }
            ClearAll();
        }
        private void eliminarButton_Click(object sender, RoutedEventArgs e)
        {
            if (PersonasBLL.Eliminar(int.Parse(idPersonaTextBox.Text)))
            {
                MessageBox.Show("Eliminado.", "Exito.",
                                MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                MessageBox.Show("Algo salio mal. Es posible que este registro ya haya sido eliminado.", "Error.",
                                MessageBoxButton.OK, MessageBoxImage.Information);
            }

            Limpiar();
        }
Example #24
0
        private void EliminarButton_Click(object sender, RoutedEventArgs e)
        {
            int id;

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

            if (PersonasBLL.Eliminar(id))
            {
                Limpiar();
            }
            else
            {
                MessageBox.Show("No Eliminado!!!");
            }
        }
        private void Eliminar_Click(object sender, RoutedEventArgs e)
        {
            int id;

            int.TryParse(PersoaIdTextBox.Text, out id);
            Limpiar();
            if (PersonasBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado con Exito", "Eliminado", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                MessageBox.Show("No Eliminado ", "Error", MessageBoxButton.OKCancel, MessageBoxImage.Error);
            }
        }
        private void ButtonEliminar(object sender, RoutedEventArgs e)
        {
            int id;

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

            if (PersonasBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado!!");
            }
            else
            {
                MessageBox.Show("No se pudo Eliminar!!");
            }
        }
Example #27
0
        public void EliminarTest()
        {
            bool paso;

            if (PersonasBLL.Eliminar(2))
            {
                paso = true;
            }
            else
            {
                paso = false;
            }

            Assert.AreEqual(paso, true);
        }
Example #28
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            int id;

            int.TryParse(PersonaIDTexBox.Text, out id);
            Limpiar();

            if (PersonasBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado!!", "Exito", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            else
            {
                MessageBox.Show("No se puede eliminar una persona que no existe");
            }
        }
Example #29
0
        private void EliminarButton_Click(object sender, RoutedEventArgs e)
        {
            int id;

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

            Limpiar();
            if (PersonasBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado", "Exito", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                MessageBox.Show("Erro Al eliminar una persona");
            }
        }
Example #30
0
        private void EliminarButton_Click(object sender, RoutedEventArgs e)
        {
            int id;

            int.TryParse(IdTextBox.Text, out id);
            Limpiar();

            if (PersonasBLL.Eliminar(id))
            {
                MessageBox.Show("Persona eliminada");
            }
            else
            {
                MessageBox.Show("no se puede eliminar a una prsona que no existe");
            }
        }