public void AjouterCompteClient(Client client, TypeCompte typeCompte, TypeAppartenantCompteEpargne?typeAppartenantCompteEpargne, string nomStructure, int nombreMois, double montant, Employe employe) { epargneBLO = new EpargneBLO(); operationBLO = new OperationBLO(); transactionBLO = new TransactionBLO(); int idEpargne = new IdentifiantBLO().IdEpargne; CompteClient compteClient = new CompteClient(CodeCompteClient(typeCompte, typeAppartenantCompteEpargne), client, typeCompte, typeAppartenantCompteEpargne, nomStructure, 0, StatutCompte.En_attente_de_validité, DateTime.Now); compteClientBLO.Add(compteClient); operationBLO.AjouterOperation(TypeOperation.Ajout, employe, client, compteClient, 0, "toto tata"); Epargne epargne = new Epargne(0); if (typeCompte == TypeCompte.Epargne) { epargneBLO.AjouterEpargne(compteClient, nombreMois, 0, employe); epargne = epargneBLO.RechercheEpargne(idEpargne); } transactionBLO.InitierTransaction(typeCompte, TypeTransaction.Dépot, epargne, compteClient, new CompteClient("Indefini"), employe, montant, 0); new IdentifiantBLO().AddIdCompteClient(); }
public double MontantDepots(CompteClient compteClient) { double montant = 0; transactionBLO = new TransactionBLO(); foreach (var item in transactionBLO.RechercherDepotSurCompte(compteClient)) { montant += item.Montant; } return(montant); }
public void RecevoirVirement(Salarie salarie, double montant, Employe employe) { transactionBLO = new TransactionBLO(); operationBLO = new OperationBLO(); creditBLO = new CreditBLO(); transactionBLO.InitierTransaction(TypeCompte.Courant, TypeTransaction.Dépot, new Epargne(0), salarie.CompteClientEntreprise, salarie.CompteClientEmploye, employe, montant, 0); string codeTransaction = transactionBLO.CodeTransaction(TypeTransaction.Dépot); transactionBLO.ValiderTransactionCompteCourant(transactionBLO.RechercherUneTransaction(codeTransaction), employe); operationBLO.AjouterOperation(TypeOperation.Virement, employe, salarie.CompteClientEmploye.Client, new CompteClient("Indefini"), montant, "toto tata"); }