public void Save() { using (var store = new DataStoreContext()) { var bin = store.RubbishBins.FirstOrDefault(x => x.Id == Id); if (bin != null) { store.RubbishBins.DeleteOnSubmit(bin); store.SubmitChanges(); } bin = new RubbishBin { BinType = BinType.Key, OriginDate = OriginDate, Interval = WeekInterval * 7 }; store.RubbishBins.InsertOnSubmit(bin); store.SubmitChanges(); } new LiveTileUpdater().UpdateTile(); Status.SetAction("Saved successfully.", true); }
public RubbishBinVM(RubbishBin data) { Data = data; }
public CollectionDay() { Date = DateTime.Today; Bins = new RubbishBin[0]; }