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");
            }
        }
Exemplo n.º 2
0
 public void AttachTrackToStation(Track track)
 {
     SelectedTracks.Add(track);
     AllTracks.Remove(track);
 }