예제 #1
0
        /// <summary>
        /// Converts a Movie to a service movie
        /// </summary>
        /// <param name="movie"></param>
        /// <returns>EntertainmentAdminService.Movie </returns>
        private EntertainmentAdminService.Movie ConvertToMovie(Movie movie)
        {
            EntertainmentAdminService.Genre genre = new EntertainmentAdminService.Genre
            {
                Id   = movie.Genre.Id,
                Name = movie.Genre.Name
            };

            EntertainmentAdminService.Country country = new EntertainmentAdminService.Country
            {
                Id   = movie.Country.Id,
                Name = movie.Country.Name
            };

            EntertainmentAdminService.Language language = new EntertainmentAdminService.Language
            {
                Id   = movie.Language.Id,
                Name = movie.Language.Name
            };

            EntertainmentAdminService.Movie temp = new EntertainmentAdminService.Movie
            {
                Title           = movie.Title,
                Genre           = genre,
                Country         = country,
                Language        = language,
                ReleaseDate     = movie.ReleasDate,
                StoryLine       = movie.Storyline,
                FilmingLocation = movie.FilmingLocation,
                Information     = movie.Information
            };
            return(temp);
        }
예제 #2
0
 /// <summary>
 /// Inserts a movie into database through server
 /// </summary>
 /// <param name="m"></param>
 public void InsertMovieIntoEntertainment(Movie m)
 {
     EntertainmentAdminService.Movie movie = ConvertToMovie(m);
     easc.StartInsertMovieTransaction(movie);
 }