private void Buscar()
 {
     if (ValidarCampos(1))
     {
         if (clienteService.BuscarInformacion(txtIdentificacion.Text.Trim()))
         {
             cliente = clienteService.InformacionCliente();
             txtIdentificacion.Text = cliente.Identificacion;
             txtCorreo.Text         = cliente.Correo;
             txtDireccion.Text      = cliente.Direccion;
             txtNombre.Text         = cliente.Nombre;
             txtTelefono.Text       = cliente.Telefono;
             txtEstado.Text         = cliente.Estado;
             if (cliente.Estado == "Activo")
             {
                 Credito = creditoService.BuscarCedito(cliente.Identificacion);
                 txtCuotasrestantes.Text = Credito.NumeroCuotas.ToString();
                 txtValorcuotas.Text     = Credito.Cuota.ToString();
                 txtSaldorestante.Text   = Credito.Saldo.ToString();
             }
             else
             {
                 txtCuotasrestantes.Text = "No debe dinero.";
                 txtSaldorestante.Text   = "No debe dinero.";
                 txtValorcuotas.Text     = "No debe dinero.";
             }
         }
         else
         {
             MessageBox.Show("No existe un cliente registrado con esa identificacion.");
         }
     }
 }
Example #2
0
 private void Buscar()
 {
     if (ValidarAlBuscar())
     {
         if (clienteService.BuscarInformacion(txtIdentificacion.Text.Trim()))
         {
             cliente = clienteService.InformacionCliente();
             if (cliente.Estado == "Activo")
             {
                 Credito = creditoService.BuscarCedito(cliente.Identificacion);
                 PintarLabel();
             }
             else
             {
                 MessageBox.Show("Se encontro un cliente con esta identificacion pero no debe dinero en estos momentos.");
             }
         }
         else
         {
             MessageBox.Show("No existe un cliente con esa identificacion.");
         }
     }
 }