Exemplo n.º 1
0
        // Ctor 1
        public Spec(IEnumerable<RapproRaw> _Rappros, Compte _CompteB, MoyenPaiement _MoyenA, MoyenPaiement _MoyenB
            , SigneOperation _Signe)
        {
            IList<Contrat> _contrats = new List<Contrat>();
            IEnumerable<Contrat> _Contrats = _contrats.ToList();

            if (_CompteB.IsBudget())
            {
                Budget _Budget = (Budget)_CompteB;
                _Contrats = _Budget.Contrats;
            }

            //SigneOperation _Signe = SigneOperation.DEPENSE;
            this.Feed(_Rappros, _CompteB, _MoyenA, _MoyenB, _Signe, _Contrats);
        }
Exemplo n.º 2
0
        // Alimentaiton initiale des props
        private void Feed(IEnumerable<RapproRaw> _Rappros, Compte _CompteB, MoyenPaiement _MoyenA, MoyenPaiement _MoyenB
            , SigneOperation _Signe, IEnumerable<Contrat> _Contrats)
        {
            Rappros = _Rappros;
            Contrats = _Contrats;
            CompteB = _CompteB;
            MoyenA = _MoyenA;
            MoyenB = _MoyenB;
            Signe = _Signe;

            var _rappros = Rappros.ToList();
            Count = _rappros.Count();

            // Opes
            Opes = new List<Operation>();
            _rappros.ForEach(r => Opes.Add(r.Operation));

            // Raws
            Raws = new List<OperationRawSG>();
            _rappros.ForEach(r => Raws.Add(r.RawSG));

            // INit stat opes
            InitStatOpes();

            // Init start raws
            InitStatRaws();

            if (Count > 0)
            {
                // Calcul de stats opes
                CalculerStatRapprosForOpes(_rappros);

                // Calcul de stats raws
                CalculerStatRapprosForRaws(_rappros);
            }

            CandidatureRetenue = false;
        }