public void SearchFilter() { if (BackUpOrdrerCollection.Count == 0) { foreach (var ordre in OrdrerCollection) { BackUpOrdrerCollection.Add(ordre); } } var FilteredOrdrer = (from ordre in BackUpOrdrerCollection where ordre.OrdreNummer.Contains(SearchInput) select ordre).ToList(); if (SearchInput == "") { OrdrerCollection.Clear(); foreach (var ordre in BackUpOrdrerCollection) { OrdrerCollection.Add(ordre); } } else { OrdrerCollection.Clear(); foreach (var ordre in FilteredOrdrer) { OrdrerCollection.Add(ordre); } } }
public async void Load() { var ordrerCollection = await PersistencyService.LoadNotesFromJsonAsync(); OrdrerCollection.Clear(); foreach (var note in ordrerCollection) { OrdrerCollection.Add(note); } }
public async void Load() { string curFile = @"C:\Users\rasmu\AppData\Local\Packages\347085fc-770a-47bf-87e0-14e3e41dd8a6_2g8htre5d9nf2\LocalState\Ordrer.json"; if (File.Exists(curFile)) { var ordrerCollection = await GemAktiveredeOrdre.LoadOrdreFromJsonAsync(); OrdrerCollection.Clear(); foreach (var ordre in ordrerCollection) { OrdrerCollection.Add(ordre); } } string curFile2 = @"C:\Users\rasmu\AppData\Local\Packages\347085fc-770a-47bf-87e0-14e3e41dd8a6_2g8htre5d9nf2\LocalState\DeaktiveredeOrdrer.json"; if (File.Exists(curFile2)) { var deaktiveredeOrdrerCollection = await GemDeaktiveredeOrdrer.LoadOrdreFromJsonAsync(); DeaktiveredeOrdrerCollection.Clear(); foreach (var ordre in deaktiveredeOrdrerCollection) { DeaktiveredeOrdrerCollection.Add(ordre); } } string curFile3 = @"C:\Users\rasmu\AppData\Local\Packages\347085fc-770a-47bf-87e0-14e3e41dd8a6_2g8htre5d9nf2\LocalState\Kunder.json"; if (File.Exists(curFile3)) { var kundeCollection = await GemKunde.LoadKunderFromJsonAsync(); KundeCollection.Clear(); foreach (var kunde in kundeCollection) { KundeCollection.Add(kunde); } } }