Esempio n. 1
0
        public void VerPrestamosPendientes(VistaPrestamosPendientes vistaPrestamosPendientes)
        {
            Boolean hayPrestamosPendientes = false;

            this.vistaPrestamosPendientes = vistaPrestamosPendientes;

            List <Prestamo> listaPrestamos = this.repositorioPrestamo.Prestamos;

            foreach (Prestamo prestamo in listaPrestamos)
            {
                if (prestamo.Estado.Equals("pendiente"))
                {
                    this.vistaPrestamosPendientes.MostrarRegistro(prestamo.Atributos);
                    hayPrestamosPendientes = true;
                }
            }

            if (hayPrestamosPendientes)
            {
                this.vistaPrestamosPendientes.Show();
            }
            else
            {
                this.vistaPrestamo.MostrarMensaje("ACTUALMENTE NO HAY PRÉSTAMOS PENDIENTES");
            }
        }
Esempio n. 2
0
 private void verPrestamosPendientesButton_Click(object sender, EventArgs e)
 {
     try
     {
         VistaPrestamosPendientes vistaPrestamosPendientes = new VistaPrestamosPendientes(this, this.gestorPrestamo);
         this.gestorPrestamo.VerPrestamosPendientes(vistaPrestamosPendientes);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }