Exemple #1
0
        public void EliminarTest()
        {
            bool paso;

            paso = PrestamoBLL.Eliminar(1);
            Assert.AreEqual(paso, true);
        }
Exemple #2
0
        private void EliminarButton_Click(object sender, EventArgs e)
        {
            MyerrorProvider.Clear();
            int      id       = Convert.ToInt32(PrestamoidnumericUpDown.Value);
            Prestamo prestamo = PrestamoBLL.Buscar(id);

            id = Convert.ToInt32(PrestamoidnumericUpDown.Value);
            if (prestamo != null)
            {
                if (PrestamoBLL.Eliminar(id))
                {
                    MessageBox.Show("Eliminado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Limpiar();
                    LlenaCombox();
                }
                else
                {
                    MyerrorProvider.SetError(PrestamoidnumericUpDown, "No se puede eliminar registro que no existe");
                }
            }
            else
            {
                MessageBox.Show("No existe!!", "Falló", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void EliminarButton_Click(object sender, RoutedEventArgs e)
        {
            var pers = PersonaBLL.Buscar(Convert.ToInt32(PersonaComboBox.SelectedValue));

            if (pers != null)
            {
                BalanceTextBox.Text = Convert.ToString(pers.Balance);
                decimal nuevoBalance = Convert.ToDecimal(BalanceTextBox.Text) - Convert.ToDecimal(MontoTextBox.Text);
                pers.Balance = nuevoBalance;
                PersonaBLL.Guardar(pers);
                this.DataContext = prestamo;
                if (PrestamoBLL.Eliminar(Convert.ToInt32(PrestamoIdTextBox.Text)))
                {
                    Limpiar();
                    MessageBox.Show("Registro Eliminado con exito", "Exito",
                                    MessageBoxButton.OK, MessageBoxImage.Information);
                }
                else
                {
                    MessageBox.Show("No se pudo Eliminar", "Fallo",
                                    MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }
            else
            {
                MessageBox.Show("Transaccion Fallida Persona no encontrada", "Fallo",
                                MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Exemple #4
0
 private void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PrestamoBLL.Eliminar(Utilidades.ToInt(MoraIdTextBox.Text)))
     {
         Limpiar();
         MessageBox.Show("Registro eliminado!", "Exito", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("No fue posible eliminar", "Fallo", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
 private void EliminarButton_Click(object render, RoutedEventArgs e)
 {
     if (PrestamoBLL.Eliminar(Convert.ToInt32(IdTextBox.Text)))
     {
         Limpiar();
         MessageBox.Show("Eliminado");
     }
     else
     {
         MessageBox.Show("Error ");
     }
 }
 public void EliminarBoton_Click(object sender, RoutedEventArgs e)
 {
     if (PrestamoBLL.Eliminar(Utilities.ToInt(PrestamoIDTextBox.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);
     }
 }
Exemple #7
0
 private void eliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (PrestamoBLL.Eliminar(int.Parse(Prestamoid.Text)))
     {
         Limpiar();
         MessageBox.Show("Se a Eliminado." + Prestamoid, "Exitosamente!",
                         MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("No se pudo eliminar el registro" + Prestamoid, "Fallo",
                         MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
 public void EliminarButton_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrWhiteSpace(PrestamoIdTextBox.Text) || PrestamoBLL.Buscar(Convert.ToInt32(PrestamoIdTextBox.Text)) == null)
     {
         MessageBox.Show("El prestamo no pudo ser eliminado, porque no existe o el id ingresado esta vacío.", "Fallo", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
     else
     {
         if (PrestamoBLL.Eliminar(Convert.ToInt32(PrestamoIdTextBox.Text)))
         {
             Limpiar();
             MessageBox.Show("El prestamo fue eliminado exitosamente.", "Exito", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         }
         else
         {
             MessageBox.Show("El prestamo no pudo ser eliminado.", "Fallo", MessageBoxButton.OK, MessageBoxImage.Warning);
         }
     }
 }
Exemple #9
0
        protected void EliminarButton_Click(object sender, EventArgs e)
        {
            PrestamoBLL repositorio        = new PrestamoBLL();
            RepositorioBase <Prestamo> dep = new RepositorioBase <Prestamo>();


            int id        = Utilities.Utils.ToInt(PrestamoIDTextbox.Text);
            var depositos = repositorio.Buscar(id);


            if (depositos == null)
            {
                Utilities.Utils.ShowToastr(this, "El Prestamo no existe", "Error", "error");
            }

            else
            {
                repositorio.Eliminar(id);

                Utilities.Utils.ShowToastr(this, "Elimino Correctamente", "Exito", "Exito");
                Limpiar();
            }
        }
Exemple #10
0
        public void EliminarTest()
        {
            bool paso = PrestamoBLL.Eliminar(prestamo.PrestamoId);

            Assert.IsTrue(paso, "Error al eliminar");
        }
Exemple #11
0
        public void EliminarTest()
        {
            bool paso = PrestamoBLL.Eliminar(1);

            Assert.IsNotNull(paso);
        }
 public void EliminarTest()
 {
     Assert.IsTrue(PrestamoBLL.Eliminar(1));
 }
Exemple #13
0
        public void EliminarTest()
        {
            bool realizado = PrestamoBLL.Eliminar(1);

            Assert.AreEqual(realizado, true);
        }
Exemple #14
0
 public bool Delete(int id)
 {
     return(PrestamoBLL.Eliminar(id));
 }