Beispiel #1
0
 public ConceptTwo(Storage _storage)
     : base(_storage)
 {
     this.prototypeManager = new PrototypeManager();
     prototypeManager["movie"] = new Movie();
     prototypeManager["actor"] = new Actor();
 }
Beispiel #2
0
 public void assignMovieToActor(Actor actor, Movie movie)
 {
     if (actor != null && movie != null)
     {
         actor.Movies.Add(movie);
         movie.Actors.Add(actor);
     }
 }
Beispiel #3
0
        /* Movie */
        public Movie saveNewMovie(string title, int year, string text)
        {
            Movie newMovie = new Movie();
            newMovie.Title = title;
            newMovie.Year = year;
            newMovie.Text = text;

            //Id wird automatisch beim Insert erstellt
            return storage.Movies.Insert(newMovie); // insert
        }
Beispiel #4
0
 private void UpdateMovie(Movie movie)
 {
     if (movie != null)
     {
         tbxTitle.Text = movie.Title;
         tbxYear.Text = movie.Year.ToString();
         tbxDescriptionMovie.Text = movie.Text;
     }
 }
Beispiel #5
0
 public void deleteMovie(Movie movie)
 {
     if (movie != null)
         storage.Movies.Delete(movie);
 }