Пример #1
0
        public void CrediterCompteClient(CompteClient compteClient, double montant, Employe employe)
        {
            operationBLO = new OperationBLO();
            epargneBLO   = new EpargneBLO();
            fondBLO      = new FondBLO();

            CompteClient oldCompteClient = compteClient;

            compteClient.Solde += montant;
            compteClientBLO[compteClientBLO.IndexOf(oldCompteClient)] = compteClient;

            if (compteClient.TypeCompte == TypeCompte.Epargne)
            {
                epargneBLO.AugmenterMontantEpargner(epargneBLO.RechercherEpargneEnCoursDuCompte(compteClient), montant, employe);
            }

            fondBLO.MettreArgentEnFond(employe, compteClient, montant, "toto tata");

            operationBLO.AjouterOperation(TypeOperation.Dépot, employe, compteClient.Client, compteClient, montant, "toto tata");
        }
Пример #2
0
        public void DebiterCompteClient(CompteClient compteClient, double montant, Employe employe)
        {
            operationBLO = new OperationBLO();

            fondBLO = new FondBLO();

            double montantFinal = (montant + CalculInteretRetrait(montant));

            CompteClient oldCompteClient = compteClient;

            compteClient.Solde -= montantFinal;
            compteClientBLO[compteClientBLO.IndexOf(oldCompteClient)] = compteClient;

            if (compteClient.TypeCompte == TypeCompte.Epargne)
            {
                epargneBLO.ReduireMontantEpargner(epargneBLO.RechercherEpargneEnCoursDuCompte(compteClient), montant, employe);
            }

            fondBLO.SortirArgentEnFond(employe, compteClient, montant, "toto tata");

            operationBLO.AjouterOperation(TypeOperation.Retrait, employe, compteClient.Client, compteClient, montantFinal, "toto tata");
        }