public InformationsClient() { WE.Security.Profile.UserProfile userProfile = Services.UserProfileServices.GetUserProfile(); Identifiant = userProfile.AccessCode; Nom = userProfile.LastName; Prenom = userProfile.FirstName; NouveauCompte = new CompteBancaire(); ChargerComptes(); }
private void ChargerComptes() { Comptes = new List <CompteBancaire>(); string[] contracts = Services.ClientContractServices.GetClientContracts(Services.UserProfileServices.GetUserProfile().ClientNumber, Services.UserIdentityServices.GetUserIdentity().Context.Company); ConfigurationHelper config = new ConfigurationHelper(); foreach (string contract in contracts) { CompteBancaire account = Services.BankInformationServices.GetBankAccounts(contract); if (account != null) { if (!Comptes.Any(c => c.Description == account.Description)) { account.NomClient = Nom; account.PrenomClient = Prenom; account.Identifiant = Comptes.Count + 1; Comptes.Add(account); } } } }