示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#4
0
 //Returner alle skuespiller
 public static List <Actor> GetActor()
 {
     return(DalManager.GetActors());
 }
示例#5
0
 //Returner alle genre navne
 public static List <Genre> GetGenreName()
 {
     return(DalManager.GetGenre());
 }
示例#6
0
 public static void DeleteGenre(int genre_id)
 {
     DalManager.DeleteGenre(genre_id);
 }
示例#7
0
 public static Film InsertFilm(Film f, int genre)
 {
     return(DalManager.InsertFilm(f, genre));
 }
示例#8
0
 //Returner alle skuspiller fra en search sting
 public static List <Actor> GetSearchActor(string SearchName)
 {
     return(DalManager.GetActorsFromSearch(SearchName));
 }
示例#9
0
 public static void DeleteGenreFromMovie(Genre g, int movie_id)
 {
     DalManager.DeleteGenreFromMovie(g, movie_id);
 }
示例#10
0
 public static void InsertGenreMovie(int movie_id, int genre_id)
 {
     DalManager.InsertGenreMovie(movie_id, genre_id);
 }
示例#11
0
 public static void DeleteActorInMovie(ActorInMovie a)
 {
     DalManager.DeleteActorInMovie(a);
 }
示例#12
0
 public static void InsertActorInMovie(ActorInMovie a)
 {
     DalManager.InsertActorInMovie(a);
 }
示例#13
0
 public static Film UpdateFilmData(Film f)
 {
     return(DalManager.UpdateFilmData(f));
 }
示例#14
0
 public static Genre InsertGenre(Genre g)
 {
     return(DalManager.InsertGenre(g));
 }
示例#15
0
 //Returner alle genre
 public static List <string> GetGenre()
 {
     return(DalManager.GetGenre());
 }
示例#16
0
 public static Actor UpdateActorData(Actor a)
 {
     return(DalManager.UpdateActorData(a));
 }
示例#17
0
 public static void DeleteMovie(int movie_id)
 {
     DalManager.DeleteMovie(movie_id);
 }
示例#18
0
 //Returner alle film fra en search sting
 public static List <Film> GetSearchFilm(string searchName)
 {
     return(DalManager.GetFilmsFromSearch(searchName));
 }
示例#19
0
 public static void DeleteActor(int actor_id)
 {
     DalManager.DeleteActor(actor_id);
 }
示例#20
0
 //Returner alle film
 public static List <Film> GetFilm()
 {
     return(DalManager.GetFilms());
 }
示例#21
0
 public static Actor InsertActor(Actor a)
 {
     return(DalManager.InsertActor(a));
 }