public async Task<Boolean> DeleteMovie (Movie movie) { HttpResponseMessage response = await serverAccessor.DeleteObject (Constants.DeleteMovieMethod, movie.id); if (response.IsSuccessStatusCode) { this.Movies.Remove (movie); return true; } Debug.WriteLine (String.Format ("Delete movie failed: {0}"), response.ToString ()); return false; }
protected override void OnCreate (Bundle savedInstanceState) { base.OnCreate (savedInstanceState); SetContentView (Resource.Layout.detailLayout); int selected = Intent.GetIntExtra ("selectKey", 0); dataManager = DataManager.Instance; detailMovie = dataManager.GetMovieById (selected); titleTextView = FindViewById<TextView> (Resource.Id.movieTitle); descriptionTextView = FindViewById<TextView> (Resource.Id.description); runtimeTextView = FindViewById<TextView> (Resource.Id.runtime); actorsListView = FindViewById<ListView> (Resource.Id.actorsList); titleTextView.Text = detailMovie.name; descriptionTextView.Text = detailMovie.description; runtimeTextView.Text = String.Format ("Runtime: {0} seconds", detailMovie.runtime); AddActors (); }
public Task<List<Actor>> GetAllActorsForMovie (Movie Movie) { return serverAccessor.GetAllActorsInMovie (Movie); }