//metode til at lave nyt hus public async void AddNewHus() { try { Model.HusInfo temphusinfo = new Model.HusInfo(); temphusinfo.AntalBabyIHusstand = Newhus.AntalBabyIHusstand; temphusinfo.AntalBarnIHusstand = Newhus.AntalBarnIHusstand; temphusinfo.AntalTeenagerIHusstand = Newhus.AntalTeenagerIHusstand; temphusinfo.AntalVoksneIHusstand = Newhus.AntalVoksneIHusstand; temphusinfo.HusNummer = Newhus.HusNummer; temphusinfo.ComboBoxIndex2 = ComboBoxIndex; HList.Add(temphusinfo); GemData(); } catch (Exception x) { var dialog = new MessageDialog(x.Message); await dialog.ShowAsync(); } }
private DeltagerSingleton() { HList = new Model.HusListe(); Newhus = new Model.HusInfo(); AddHusCommand = new RelayCommand(AddNewHus); SletHusCommand = new RelayCommand(Slethus); SletAlleCommand = new RelayCommand(Rydliste); HentJsonCommand = new RelayCommand(HentData); GemJsonCommand = new RelayCommand(GemData); AddCombobox(); kokoghjælpere = DagsplanSingleton.Instance; localfolder = ApplicationData.Current.LocalFolder; this.mandagpris = 0.0; this.tirsdagpris = 0.0; this.onsdagpris = 0.0; this.torsdagpris = 0.0; this.fredagpris = 0.0; this.lørdagpris = 0.0; this.søndagpris = 0.0; this.huspris = 0.0; HusPris(); HentData(); }