public void EditerClient(Client client, string nomComplet, DateTime dateNaissance, string lieuNaissance, StatutSexe sexe, string numeroCNI, string numeroTelephone1, string numeroTelephone2, Pays pays, Ville ville, string adresse, string photoProfil, string profession, Employe employe) { operationBLO = new OperationBLO(); fichierStockeBLO = new FichierStockeBLO(); int index = clientBLO.IndexOf(client); string fileName = client.PhotoProfil; client.NomComplet = nomComplet; client.DateNaissance = dateNaissance; client.LieuNaissance = lieuNaissance; client.Sexe = sexe; client.NumeroCNI = numeroCNI; client.NumeroTelephone1 = numeroTelephone1; client.NumeroTelephone2 = numeroTelephone2; client.Pays = pays; client.Ville = ville; client.Adresse = adresse; client.PhotoProfil = photoProfil; client.Profession = profession; if (photoProfil != fileName) { fichierStockeBLO.AjouterFichierStocke($"Photo du client {client.CodeClient}", photoProfil, client, new Garantie(0), StatutStockage.Image_des_clients, employe); } clientBLO[index] = client; operationBLO.AjouterOperation(TypeOperation.Ajout, employe, client, new CompteClient("Indefini"), 0, "toto tata"); }
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 EmployeBLO() { employeBLO = new RepositoireDAOFile <Employe>(); fichierStockeBLO = new FichierStockeBLO(); if (employeBLO.Count == 0) { // Creation du compte chef d'agence AjouterEmploye(StatutEmploye.Chef_Agence.ToString(), null, string.Empty, null, "000000000", " ", " ", new Pays("Indefini"), new Ville("Indefini"), string.Empty, string.Empty, "1234", StatutEmploye.Chef_Agence, new Employe("Indefini")); // Creation du compte chef de credit AjouterEmploye(StatutEmploye.Chef_Credit.ToString(), null, string.Empty, null, "000000000", " ", " ", new Pays("Indefini"), new Ville("Indefini"), string.Empty, string.Empty, "1234", StatutEmploye.Chef_Credit, new Employe("Indefini")); // Creation du compte comptable AjouterEmploye(StatutEmploye.Comptable.ToString(), null, string.Empty, null, "000000000", " ", " ", new Pays("Indefini"), new Ville("Indefini"), string.Empty, string.Empty, "1234", StatutEmploye.Comptable, new Employe("Indefini")); // Creation du compte secretaire comptable AjouterEmploye(StatutEmploye.Secretaire_Comptable.ToString(), null, string.Empty, null, "000000000", " ", " ", new Pays("Indefini"), new Ville("Indefini"), string.Empty, string.Empty, "1234", StatutEmploye.Secretaire_Comptable, new Employe("Indefini")); // Creation du compte caissier AjouterEmploye(StatutEmploye.Caissier.ToString(), null, string.Empty, null, "000000000", " ", " ", new Pays("Indefini"), new Ville("Indefini"), string.Empty, string.Empty, "1234", StatutEmploye.Caissier, new Employe("Indefini")); } }
public void AjouterGarantie(Credit credit, string nom, string elementEnGarantie, Avaliste avaliste, string description, double montantEvaluation, Employe employe) { operationBLO = new OperationBLO(); fichierStockeBLO = new FichierStockeBLO(); garantieBLO.Add(new Garantie(new IdentifiantBLO().IdGarantie, DateTime.Now, credit, nom, elementEnGarantie, avaliste, StatutGarantie.En_gage, description, montantEvaluation)); operationBLO.AjouterOperation(TypeOperation.Ajout, employe, credit.Client, new CompteClient("Indefini"), montantEvaluation, description); if (elementEnGarantie != string.Empty) { fichierStockeBLO.AjouterFichierStocke($"Garantie {nom}", elementEnGarantie, credit.Client, RechercherCredit(new IdentifiantBLO().IdGarantie), StatutStockage.Garantie, employe); } new IdentifiantBLO().AddIdGarantie(); }