private async Task AddMovie() { try { if (IsFileSelected()) { BitmapImage image = ImageUtility.ByteArrayToBitmapImage(_posterByteArray); Poster poster = new Poster(ImageUtility.GetImageFormat(_posterFileName), ImageUtility.PosterURLFromFilename(_posterFileName), _posterFileName, image); await MovieManagement.MovieManagement.AddMovieAsync(new Movie(Title, Description, Director, _yearInt, _priceDecimal, poster)); AddMovie(new Movie(Title, Description, Director, _yearInt, _priceDecimal, poster)); ClearPage(); } else { SetMessage("Select a poster file.", ERROR_COLOR); } } catch (ServerException e) { ClearForm(); SetMessage(e.Message, ERROR_COLOR); } catch (Exception e) { ClearForm(); SetMessage(e.Message, ERROR_COLOR); } }