Example #1
0
        //Returner alle skuespiller i en bestemt film
        public static List <Actor> GetActorInMovies(int movie_id, List <Film> movies)
        {
            List <Actor> actorsName = new List <Actor>();

            List <ActorInMovie> actorInMovies = DalManager.GetActorInMovies();

            List <Actor> actors = GetActor();



            //Tjekker om movie_id på actor er det samme id på den valgte film
            for (int i = 0; i < actorInMovies.Count; i++)
            {
                if (actorInMovies[i].Movie_id == movie_id)
                {
                    for (int j = 0; j < actors.Count; j++)
                    {
                        if (actors[j].Id == actorInMovies[i].Actor_id)
                        {
                            actorsName.Add(actors[j]);
                        }
                    }
                }
            }
            return(actorsName);
        }
Example #2
0
        //Returner alle skuespiller i en bestemt film
        public static List <string> GetActorInMovies(int movie_id, List <Film> movies)
        {
            List <string> actorsName = new();

            List <ActorInMovie> actorInMovies = DalManager.GetActorInMovies();

            List <Actor> actors = GetActor();

            //Tjekker om movie_id på actor er det samme id på den valgte film
            foreach (ActorInMovie actor in actorInMovies)
            {
                if (actor.Movie_id == movies[movie_id].Id)
                {
                    actorsName.Add(actors[actor.Actor_id].Firstname + " " + actors[actor.Actor_id].Lastname);
                }
            }
            return(actorsName);
        }
Example #3
0
        //Returner alle film som i en bestemt skuespiller har været med i
        public static List <string> GetFilmsFromActor(int actor_id, List <Actor> actors)
        {
            List <string> MovieName = new();

            List <ActorInMovie> actorInMovies = DalManager.GetActorInMovies();

            List <Film> films = GetFilm();

            //Tjekker om actor_id på film er det samme id på den valgte skuespiller
            foreach (ActorInMovie film in actorInMovies)
            {
                if (film.Actor_id == actors[actor_id].Id)
                {
                    MovieName.Add(films[film.Movie_id].Title);
                }
            }
            return(MovieName);
        }
Example #4
0
 //Returner alle skuespiller
 public static List <Actor> GetActor()
 {
     return(DalManager.GetActors());
 }
Example #5
0
 //Returner alle genre navne
 public static List <Genre> GetGenreName()
 {
     return(DalManager.GetGenre());
 }
Example #6
0
 public static void DeleteGenre(int genre_id)
 {
     DalManager.DeleteGenre(genre_id);
 }
Example #7
0
 public static Film InsertFilm(Film f, int genre)
 {
     return(DalManager.InsertFilm(f, genre));
 }
Example #8
0
 //Returner alle skuspiller fra en search sting
 public static List <Actor> GetSearchActor(string SearchName)
 {
     return(DalManager.GetActorsFromSearch(SearchName));
 }
Example #9
0
 public static void DeleteGenreFromMovie(Genre g, int movie_id)
 {
     DalManager.DeleteGenreFromMovie(g, movie_id);
 }
Example #10
0
 public static void InsertGenreMovie(int movie_id, int genre_id)
 {
     DalManager.InsertGenreMovie(movie_id, genre_id);
 }
Example #11
0
 public static void DeleteActorInMovie(ActorInMovie a)
 {
     DalManager.DeleteActorInMovie(a);
 }
Example #12
0
 public static void InsertActorInMovie(ActorInMovie a)
 {
     DalManager.InsertActorInMovie(a);
 }
Example #13
0
 public static Film UpdateFilmData(Film f)
 {
     return(DalManager.UpdateFilmData(f));
 }
Example #14
0
 public static Genre InsertGenre(Genre g)
 {
     return(DalManager.InsertGenre(g));
 }
Example #15
0
 //Returner alle genre
 public static List <string> GetGenre()
 {
     return(DalManager.GetGenre());
 }
Example #16
0
 public static Actor UpdateActorData(Actor a)
 {
     return(DalManager.UpdateActorData(a));
 }
Example #17
0
 public static void DeleteMovie(int movie_id)
 {
     DalManager.DeleteMovie(movie_id);
 }
Example #18
0
 //Returner alle film fra en search sting
 public static List <Film> GetSearchFilm(string searchName)
 {
     return(DalManager.GetFilmsFromSearch(searchName));
 }
Example #19
0
 public static void DeleteActor(int actor_id)
 {
     DalManager.DeleteActor(actor_id);
 }
Example #20
0
 //Returner alle film
 public static List <Film> GetFilm()
 {
     return(DalManager.GetFilms());
 }
Example #21
0
 public static Actor InsertActor(Actor a)
 {
     return(DalManager.InsertActor(a));
 }