protected virtual void DeleteRecord(SharedCollectionBase <TDTO> db, TDTO dto) { if (CanDeletetRecord(dto)) { db.Delete(dto); } ReloadFromDB(); }
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(); } }
protected override List <FundRequestDTO> QueryItems(SharedCollectionBase <FundRequestDTO> db) => db.GetAll().Where(_ => _.BankAccountId == AppArgs.AccountId) .OrderByDescending(_ => _.SerialNum).ToList();
protected override List <RequestedChequeDTO> QueryItems(SharedCollectionBase <RequestedChequeDTO> db) => db.GetAll().Where(_ => _.IssuedDate.HasValue && _.Request.BankAccountId == _mainWin.AccountId).ToList();
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(); }