private void DisplayMovie(Movie movie) { this.Title.Text = movie.Title; this.SubTitle.Text = movie.Subtitle; this.Genre.Text = movie.Genre; this.Summary.Text = movie.Summary; }
private void InsertMovie(string title, string subtitle, string genre) { // Film-Objekt erzeugen Movie movie = new Movie(); movie.Title = title; movie.Subtitle = subtitle; movie.Genre = genre; movie.Summary = string.Empty; movie.AddedDate = DateTime.Now; // Film hinzufügen und speichern App.DB.Movies.InsertOnSubmit(movie); App.DB.SubmitChanges(); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); if (this.NavigationContext.QueryString.ContainsKey("id")) { movieId = int.Parse(this.NavigationContext.QueryString["id"]); this.selectedMovie = GetMovie(movieId); // Wenn Film gefunden wurde anzeigen if (this.selectedMovie != null) { this.DisplayMovie(this.selectedMovie); if (this.photoStream != null) { // Bild speichern this.StoreMovieImage(this.photoStream); this.photoStream = null; } this.MovieImages.ItemsSource = this.selectedMovie.Images; } } }