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 void AktiverOrdre() { if (SelectedOrdre != null) { var OrdreToActivate = (from ordre in DeaktiveredeOrdrerCollection where SelectedOrdre.OrdreNummer == ordre.OrdreNummer select ordre).FirstOrDefault(); OrdreToActivate.Aktiveret = true; DeaktiveredeOrdrerCollection.Remove(OrdreToActivate); OrdrerCollection.Add(OrdreToActivate); SaveOrdrer(); OnPropertyChanged(); } }
public void OpretOrdre() { KundeCollection.Add(new Kunde(KundeCVRnummer, Navn, Firma, Adresse, By, Postnr, Mail, Telefonnr)); OrdrerCollection.Add(new Ordre(Date, Laminering, Fragt, OpTil10, Montering, Afhentes, KundeCVRnummer, ProduktCollection)); OnPropertyChanged(); SaveOrdrer(); SaveKunder(); frame.Navigate(typeof(Forside)); //var SorteretEfterDato = (from ordre in OrdrerCollection orderby ordre.Date descending select ordre); //OrdrerCollection.Clear(); //foreach (var ordre in SorteretEfterDato) //{ // OrdrerCollection.Add(ordre); //} }
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); } } }
public void OpretOdre() { OrdrerCollection.Add(new Ordre(SelectedMedie, SelectedFolie, Farve, Længde, Bredde, Antal, Laminering, Fragt, OpTil10, Montering, Afhentes, Kommentar)); OnPropertyChanged(); Save(); }