static private bool presupuestoCoincidente(Egreso egreso)
 {
     if (egreso.presupuestoElegido == null)
     {
         return(false);
     }
     else
     {
         Presupuesto presupuesto_elegido = egreso.presupuestoElegido;
         return(egreso.presupuestos.Any(Presupuesto => presupuesto_elegido.id_presupuesto == Presupuesto.id_presupuesto));
     }
 }
Beispiel #2
0
        public override Presupuesto Criterio(List <Presupuesto> Presupuestos)
        {
            Presupuesto menorValor = Presupuestos[0];

            for (int i = 1; i < Presupuestos.Count(); i++)
            {
                if (Presupuestos[i].valor_total < menorValor.valor_total)
                {
                    menorValor = Presupuestos[i];
                }
            }
            return(menorValor);
        }