private void ReactOnUsersAdd() { var tag = _db.SeekAccount(MyTagPickerVm.TagInWork.Name); TranInWork.Tags.Add(tag); var associatedTag = _associationFinder.GetAssociation(TranInWork, tag); if (associatedTag != null) { MyTagPickerVm.AssociatedTag = new AccName().PopulateFromAccount(associatedTag, null); } MyTagPickerVm.TagInWork = null; }
public List <Account> GetExternalAccounts() { var result = _db.AccountPlaneList. Where(account => account.Is("Внешние") && account.Children.Count == 0).ToList(); result.Add(_db.SeekAccount("Банки")); return(result); }
public FilterModel(KeeperDb db, AccNameSelectionControlInitializer accNameSelectionControlInitializer) { AvailableAccNames = new List <AccName> { new AccName().PopulateFromAccount(db.SeekAccount("Мои"), new List <string>()) }; IsAccNamePosition12 = true; AmountEqualTo = true; IsCurrencyPosition12 = true; MyTagPickerVm = new TagPickerVm { TagSelectorVm = accNameSelectionControlInitializer.ForFilter(), Tags = MyTags }; IsTagsJoinedByAnd = true; CleanAll(); MyTags.CollectionChanged += MyTags_CollectionChanged; }