private void AgregarBotton_Click(object sender, RoutedEventArgs e)
        {
            mora.Detalle.Add(new MoraDetalle(mora.MoraId, Convert.ToInt32(PrestamoIdTextBox.Text), Convert.ToInt32(ValorTextBox.Text)));
            Cargar();

            PrestamoIdTextBox.Clear();
            ValorTextBox.Clear();
        }
        private void AgregarFilaButton_Click(object sender, RoutedEventArgs e)
        {
            mora.Detalles.Add(new MorasDetalle(mora.MoraId, int.Parse(PrestamoIdTextBox.Text), Double.Parse(ValorTextBox.Text)));

            Refresh();

            PrestamoIdTextBox.Clear();
            ValorTextBox.Clear();
        }
Example #3
0
        private void AgregarButton_Click(object sender, RoutedEventArgs e)
        {
            if (!Validar())
            {
                return;
            }

            var detalle = new PrestamoMorasDetalle(int.Parse(IdTextBox.Text), int.Parse(MoraIdDetalleTextBox.Text),
                                                   int.Parse(PrestamoIdTextBox.Text), double.Parse(ValorTextBox.Text));

            prestamoMoras.MorasDetalle.Add(detalle);
            prestamoMoras.Total = double.Parse(TotalTextBox.Text);

            Refrescar();
            MoraIdDetalleTextBox.Clear();
            PrestamoIdTextBox.Clear();
            ValorTextBox.Clear();
            IdTextBox.Focus();
        }