static void Main(string[] args)
        {
            Financiera    financiera = new Financiera("Mi Financiera");
            PrestamoDolar pd1        = new PrestamoDolar(1500, new DateTime(2018, 11, 01),
                                                         PeriodicidadDePagos.Mensual);
            PrestamoDolar pd2 = new PrestamoDolar(2000, new DateTime(2018, 12, 05),
                                                  PeriodicidadDePagos.Bimestral);
            PrestamoDolar pd3 = new PrestamoDolar(2500, new DateTime(2019, 01, 01),
                                                  PeriodicidadDePagos.Trimestral);
            PrestamoPesos pp1 = new PrestamoPesos(8000, new DateTime(2019, 01, 01), 20);
            PrestamoPesos pp2 = new PrestamoPesos(7000, new DateTime(2043, 10, 01), 25);
            PrestamoPesos pp3 = new PrestamoPesos(5000, new DateTime(2018, 11, 20), 20);

            financiera = financiera + pd1;
            financiera = financiera + pd2;
            financiera = financiera + pd3;
            financiera = financiera + pd3; //Préstamo repetido
            financiera = financiera + pp1;
            financiera = financiera + pp2;
            financiera = financiera + pp3;
            financiera = financiera + pp3; //Préstamo repetido
            Console.WriteLine((String)financiera);
            pd1.ExtenderPlazo(new DateTime(2043, 12, 01));
            pp1.ExtenderPlazo(new DateTime(2019, 02, 01));
            financiera.OrdenarPrestamos();
            Console.WriteLine("\n ********************ORDENADOS POR FECHA**************************");
            Console.WriteLine(Financiera.Mostrar(financiera));
            Console.ReadKey();
        }
示例#2
0
        public static string Mostrar(Financiera financiera)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Razon social: " + financiera.RazonSocial);
            foreach (Prestamo p in financiera.listaDePrestamos)
            {
                sb.AppendLine(p.Mostrar());
            }
            return(sb.ToString());
        }
示例#3
0
 public static string Mostrar(Financiera f1)
 {
     //f1.OrdenarPrestamos();
     return((string)f1);
 }
示例#4
0
 public static string Mostrar(Financiera financera)
 {
     return((string)financera);
 }
示例#5
0
 public static string Mostrar(Financiera f)
 {
     return((string)f);
 }