public void AjouterClient(string nomComplet, DateTime?dateNaissance, string lieuNaissance, StatutSexe?sexe, string numeroCNI, string numeroTelephone1, string numeroTelephone2, Pays pays, Ville ville, string adresse, string photoProfil, string profession, TypeCompte typeCompte, TypeAppartenantCompteEpargne?typeAppartenantCompteEpargne, string nomStructure, Employe employe, int nombreMois, double montant) { operationBLO = new OperationBLO(); fichierStockeBLO = new FichierStockeBLO(); compteClientBLO = new CompteClientBLO(); Client client = new Client(CodeClient, nomComplet, dateNaissance, lieuNaissance, sexe, numeroCNI, numeroTelephone1, numeroTelephone2, pays, ville, adresse, photoProfil, DateTime.Now, profession, StatutClient.Desactivé); clientBLO.Add(client); compteClientBLO.AjouterCompteClient(client, typeCompte, typeAppartenantCompteEpargne, nomStructure, nombreMois, montant, employe); operationBLO.AjouterOperation(TypeOperation.Ajout, employe, client, compteClientBLO.RechercherUnCompte(compteClientBLO.CodeCompteClient(typeCompte, typeAppartenantCompteEpargne)), 0, "toto tata"); if (photoProfil != string.Empty) { fichierStockeBLO.AjouterFichierStocke($"Photo du client {CodeClient}", photoProfil, client, new Garantie(0), StatutStockage.Image_des_clients, employe); } new IdentifiantBLO().AddIdClient(); }
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 void InitierTransaction(TypeCompte typeCompte, TypeTransaction typeTransaction, Epargne epargne, CompteClient compteClientEmetteur, CompteClient compteClientDestinataire, Employe employe, double montant, int nombreJourAttente) { operationBLO = new OperationBLO(); transactionBLO.Add(new Transaction(CodeTransaction(typeTransaction), typeCompte, typeTransaction, epargne, DateTime.Now, compteClientEmetteur, compteClientDestinataire, employe, new Employe("Indefini"), montant, StatutTransaction.En_cours_de_validité, nombreJourAttente)); if (typeTransaction == TypeTransaction.Dépot) { operationBLO.AjouterOperation(TypeOperation.Dépot, employe, compteClientEmetteur.Client, compteClientEmetteur, montant, "toto tata"); } else if (typeTransaction == TypeTransaction.Retrait) { operationBLO.AjouterOperation(TypeOperation.Retrait, employe, compteClientEmetteur.Client, compteClientEmetteur, montant, "toto tata"); } else { operationBLO.AjouterOperation(TypeOperation.Transfert_inter_compte, employe, compteClientEmetteur.Client, compteClientEmetteur, montant, "toto tata"); } new IdentifiantBLO().AddIdTransaction(); }
public CompteClient(string codeCompte, Client client, TypeCompte typeCompte, TypeAppartenantCompteEpargne?typeAppartenantCompteEpargne, string nomStructure, double solde, StatutCompte statutCompte, DateTime dateEnregistrement) : this(codeCompte) { Client = client; TypeCompte = typeCompte; TypeAppartenantCompteEpargne = typeAppartenantCompteEpargne; NomStructure = nomStructure; Solde = solde; StatutCompte = statutCompte; DateEnregistrement = dateEnregistrement; }
public Transaction(string codeTransaction, TypeCompte typeCompte, TypeTransaction typeTransaction, Epargne epargne, DateTime dateTransaction, CompteClient compteClientEmetteur, CompteClient compteClientDestinataire, Employe employeEmetteur, Employe employeValideur, double montant, StatutTransaction statutTransaction, int nombreJourAttente) : this(codeTransaction) { TypeCompte = typeCompte; TypeTransaction = typeTransaction; Epargne = epargne; DateTransaction = dateTransaction; CompteClientEmetteur = compteClientEmetteur; CompteClientDestinataire = compteClientDestinataire; EmployeEmetteur = employeEmetteur; EmployeValideur = employeValideur; Montant = montant; StatutTransaction = statutTransaction; NombreJourAttente = nombreJourAttente; }
/// <summary> /// Création d'un compte avec date de création /// </summary> /// <param name="dateCréa"></param> public CompteBancaire(DateTime dateCréa, TypeCompte type) //La création de plusieurs constructeurs s'appelle la surcharge { _dateCréation = dateCréa; _type = type; }
public CompteBancaire(TypeCompte type) //Constructeur de la class CompteBancaire { _dateCréation = DateTime.Today; _type = type; }
public string CodeCompteClient(TypeCompte typeCompte, TypeAppartenantCompteEpargne?typeAppartenantCompteEpargne) => ((typeCompte == TypeCompte.Epargne && typeAppartenantCompteEpargne == TypeAppartenantCompteEpargne.Entreprise) ? "cen-" : "ccl-") + (new IdentifiantBLO().IdCompteClient.ToString().PadLeft(8, '0'));
public IEnumerable <CompteClient> CompteDesComptesDuClient(TypeCompte typeCompte, Client client) => compteClientBLO.Find(x => x.TypeCompte == typeCompte && x.Client == client);
/// <summary> /// Création d'un compte avec date de création /// </summary> /// <param name="dateCréa">Date de création</param> public CompteBancaire(TypeCompte type) { _dateCréation = DateTime.Today; _type = type; }