Exemple #1
0
        public ArticlesAssociationsViewModel(KeeperDb db, ComboboxCaterer comboboxCaterer)
        {
            _db = db;
            _comboboxCaterer = comboboxCaterer;

            InitializeListsForCombobox();

            Rows = _db.ArticlesAssociations;

            var view = CollectionViewSource.GetDefaultView(Rows);

            view.SortDescriptions.Add(new SortDescription("OperationType", ListSortDirection.Ascending));
            view.SortDescriptions.Add(new SortDescription("ExternalAccount", ListSortDirection.Ascending));
        }
 public ReceiptViewModel(ComboboxCaterer comboboxCaterer)
 {
     CurrencyList    = Enum.GetValues(typeof(CurrencyCodes)).OfType <CurrencyCodes>().ToList();
     ExpenseArticles = comboboxCaterer.GetExpenseArticles();
 }