public void Add(Event newEvent) { events.Add(newEvent); PersistencyService.SaveEventsAsJsonAsync(newEvent); LoadEventsAsync(); }
public void Remove(Event eet) { if (eet != null) { Events.Remove(eet); PersistencyService.SaveEventsAsJsonAsync(Events); LoadEventAsync(); } }
public async void Remove(Event e) { if (e != null) { Events.Remove(e); bool result = await PersistencyService.SaveEventsAsJsonAsync(Events); if (result = true) { LoadFile(); } } }
public void AddEvent(int id, string name, string description, string place, DateTime datetime) { if (name != null && id != null) { Event newEvent = new Event(id, name, description, place, datetime); _eventcatalog.Add(newEvent); PersistencyService.SaveEventsAsJsonAsync(Events); } else { throw new ArgumentException("Missing ID or Name"); } }
public void Update(int index, Event eventToUpdate) { Events[index] = eventToUpdate; PersistencyService.SaveEventsAsJsonAsync(Events); }
public void Remove(int index) { Events.RemoveAt(index); PersistencyService.SaveEventsAsJsonAsync(Events); }
public void Remove(Event eventToBeRemoved) { ObservableCollection.Remove(eventToBeRemoved); PersistencyService.SaveEventsAsJsonAsync(_observableCollection); }
public void Add(int id, string name, string description, string place, DateTime dateTime) { ObservableCollection.Add(new Event(id, name, description, place, dateTime)); PersistencyService.SaveEventsAsJsonAsync(_observableCollection); }
public void Remove(Event e) { ObservableCollection.Remove(e); PersistencyService.SaveEventsAsJsonAsync(ObservableCollection); }
public void Add(Event e) { Events.Add(e); PersistencyService.SaveEventsAsJsonAsync(Events); }