/// <summary> /// Modidie un mouvement (prépare les champs /// </summary> /// <param name="echeancier">l'échancier à modifié </param> public async Task ModifierEcheancier(Echeancier echeancier) { IsModif = true; IdEcheancierSelect = echeancier.Id; //Info des dates SelectedCompte = await _compteBusiness.GetCompte(echeancier.IdCompte); DateLimiteEcheancier = echeancier.DateLimite; IsDateLimite = echeancier.IsDateLimite; DateEcheancier = echeancier.Date; NbJours = echeancier.NbJours; SelectedPeriodicite = ListePeriodicite[echeancier.IdPeriodicite - 1]; //Info du mouvement Credit = echeancier.Credit; if (echeancier.Debit != 0) { Debit = echeancier.Debit; } else { Debit = null; } SelectedTypeMouvement = TypeMouvementListe[echeancier.ModeMouvement - 1]; SelectedCategorieFmList = ContexteAppli.ListeCategoriesMouvement.SelectMany(varA => varA.SousCategorieList.Where(varB => varB.Id == echeancier.IdType && varB.IsSousCategPerso == echeancier.IsTypePerso)).FirstOrDefault(); SelectedCompteVirement = (echeancier.IdCompteVirement > 0) ? await _compteBusiness.GetCompte(echeancier.IdCompteVirement):null; Commentaire = echeancier.Commentaire; }
/// <summary> /// Et à jour le solde du compte affiché /// </summary> /// <returns></returns> public async Task UpdateSoldeCompte() { if (App.ModeApp == AppareilEnum.ModeAppareilPrincipal) { Compte = await _compteBusiness.GetCompte(Compte.Id); } else { Compte = await RoamingCompteBusiness.GetCompte(Compte.Id); } }