private async Task Clicked() { TracklistTrackUpsertRequest req = new TracklistTrackUpsertRequest() { DateAdded = DateTime.Now, TrackId = SelectedTrack.TrackId, TracklistId = TracklistId }; try { if (AddTracks == true) { await _tracklistTrackService.Insert <TracklistTrack>(req); } else { await _tracklistTrackService.Update <TracklistTrack>(0, req); } Tracks.Remove(SelectedTrack); AllTracks.Remove(SelectedTrack); SelectedTrack = null; } catch (Exception ex) { await Application.Current.MainPage.DisplayAlert("Error", ex.Message, "OK"); } }
public void AttachTrackToStation(Track track) { SelectedTracks.Add(track); AllTracks.Remove(track); }