Example #1
0
 public MovieActor(Movie m, Actor a, bool NoAdd)
 {
     if (NoAdd == true)
     {
         Movie = m;
         Actor = a;
     }
 }
Example #2
0
        private void btnEditMovie_Click(object sender, EventArgs e)
        {
            FormEditMovies.SelectedMovie = (Movie)lbMovies.SelectedItem;
            new FormEditMovie().ShowDialog();

            foreach (var k in Movie.Movies.Keys)
                if (Movie.Movies[k] == FormEditMovies.SelectedMovie)
                {
                    Movie.Movies[k].Title = FormEditMovies.SelectedMovie.Title;
                    Movie.Movies[k].CountryOfOrigin = FormEditMovies.SelectedMovie.CountryOfOrigin;
                    Movie.Movies[k].ReleaseDate = FormEditMovies.SelectedMovie.ReleaseDate;
                    Movie.Movies[k].Language = FormEditMovies.SelectedMovie.Language;

                }

            RefreshlbMovies();
        }
Example #3
0
 public List<Movie> GetAll()
 {
     var movies = new List<Movie>();
     for (var i = 1; i <= 77; i++)
     {
         var movie = new Movie
         {
             MovieId = i,
             Cast = new[] { "Craig", "Someone else" },
             Classification = "M15",
             Genre = "Horror",
             Rating = 5,
             ReleaseDate = 2001,
             Title = "Movie " + i
         };
         movies.Add(movie);
     }
     return movies;
 }
Example #4
0
        private void lbMovies_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int index = this.lbMovies.IndexFromPoint(e.Location);
            if (index != System.Windows.Forms.ListBox.NoMatches)
            {
                FormEditMovies.SelectedMovie = (Movie)lbMovies.SelectedItem;
            new FormEditMovie().ShowDialog();

            foreach (var k in Movie.Movies.Keys)
                if (Movie.Movies[k] == FormEditMovies.SelectedMovie)
                {
                    Movie.Movies[k].Title = FormEditMovies.SelectedMovie.Title;
                    Movie.Movies[k].CountryOfOrigin = FormEditMovies.SelectedMovie.CountryOfOrigin;
                    Movie.Movies[k].ReleaseDate = FormEditMovies.SelectedMovie.ReleaseDate;
                    Movie.Movies[k].Language = FormEditMovies.SelectedMovie.Language;
                }
            RefreshlbMovies();
            }
        }
        public void Create_VerifySubsequentRequestsYieldAnIncrementingMovieId()
        {
            var movieRepository = MovieRepository;
            var movie = new Movie
            {
                Title = "Title",
                Cast = new[] { "someone" },
                Classification = "M15",
                Rating = 5,
                Genre = "Drama",
                ReleaseDate = 2014
            };

            var firstMovieId = movieRepository.Create(movie);
            var secondMovieId = movieRepository.Create(movie);

            secondMovieId
                .Should()
                .Be(firstMovieId + 1);
        }
Example #6
0
 public int Create(Movie movie)
 {
     return 1;
 }
Example #7
0
 public void Update(Movie movie)
 {
     
 }
Example #8
0
 public MovieActor(Movie m, Actor a)
 {
     Movie = m; Actor = a;
     MovieActors.Add(this);
 }
Example #9
0
 public Task <DataSet <Movie> > GetMovieAsync(_Int32 id, CancellationToken ct = default(CancellationToken))
 {
     return(Movie.Where(_ => _.ID == id).ToDataSetAsync(ct));
 }