Example #1
0
 protected virtual void DeleteRecord(SharedCollectionBase <TDTO> db, TDTO dto)
 {
     if (CanDeletetRecord(dto))
     {
         db.Delete(dto);
     }
     ReloadFromDB();
 }
Example #2
0
        public SavedListVMBase(SharedCollectionBase <TDTO> sharedCollection, TArg appArguments, bool doReload = true)
        {
            _repo      = sharedCollection;
            AppArgs    = appArguments;
            RefreshCmd = R2Command.Relay(ReloadFromDB, null, "Refresh");

            _repo.ContentChanged        += (s, e) => ReloadFromDB();
            ItemsList.ItemDeleted       += (s, e) => ExecuteDeleteRecord(e);
            ItemsList.CollectionChanged += (s, e) => UpdateTotalSum();
            ItemsList.ItemOpened        += ItemsList_ItemOpened;

            if (doReload)
            {
                ReloadFromDB();
            }
        }
Example #3
0
 protected override List <FundRequestDTO> QueryItems(SharedCollectionBase <FundRequestDTO> db)
 => db.GetAll().Where(_ => _.BankAccountId == AppArgs.AccountId)
 .OrderByDescending(_ => _.SerialNum).ToList();
Example #4
0
 protected override List <RequestedChequeDTO> QueryItems(SharedCollectionBase <RequestedChequeDTO> db)
 => db.GetAll().Where(_ => _.IssuedDate.HasValue &&
                      _.Request.BankAccountId == _mainWin.AccountId).ToList();
Example #5
0
 protected virtual List <TDTO> QueryItems(SharedCollectionBase <TDTO> db)
 => db.GetAll();
 public FilteredSavedListVMBase(SharedCollectionBase <TDTO> sharedCollection, TArg appArguments, bool doReload = true) : base(sharedCollection, appArguments, doReload)
 {
     Filter.TextFilterChanged += (s, e) => ApplyTextFilters();
 }