예제 #1
0
        private SimpleMovie CreateSimpleMovie(JSonClasses.AlloCineMovie.Movie movie)
        {
            SimpleMovie simpleMovie = new SimpleMovie();

            simpleMovie.Title = movie.Title;
            simpleMovie.Synopsis = movie.Synopsis;
            simpleMovie.ShortSynopsis = movie.SynopsisShort;
            string[] date = movie.Release.ReleaseDate.Split('-');
            int[] dateInt = {0,0,0};
            for (int i = 0; i < date.Count(); i++)
            {
                 Int32.TryParse(date[i],out dateInt[i]);
            }
            simpleMovie.ReleaseDate = new DateTime(dateInt[0], dateInt[1], dateInt[2]);
            //simpleMovie.ReleaseDate = DateTime.TryParse(movie.Release.ReleaseDate,,out simpleMovie.ReleaseDate);
            simpleMovie.ProductionYear = movie.ProductionYear;
            simpleMovie.PosterLink = movie.Poster.Href;
            simpleMovie.OriginalTitle = movie.OriginalTitle;

            return simpleMovie;
        }
예제 #2
0
        private SimpleMovie CreateSimpleMovie(JSonClasses.AlloCineMovie.Movie movie)
        {
            SimpleMovie simpleMovie = new SimpleMovie();

            simpleMovie.Title         = movie.Title;
            simpleMovie.Synopsis      = movie.Synopsis;
            simpleMovie.ShortSynopsis = movie.SynopsisShort;
            string[] date    = movie.Release.ReleaseDate.Split('-');
            int[]    dateInt = { 0, 0, 0 };
            for (int i = 0; i < date.Count(); i++)
            {
                Int32.TryParse(date[i], out dateInt[i]);
            }
            simpleMovie.ReleaseDate = new DateTime(dateInt[0], dateInt[1], dateInt[2]);
            //simpleMovie.ReleaseDate = DateTime.TryParse(movie.Release.ReleaseDate,,out simpleMovie.ReleaseDate);
            simpleMovie.ProductionYear = movie.ProductionYear;
            simpleMovie.PosterLink     = movie.Poster.Href;
            simpleMovie.OriginalTitle  = movie.OriginalTitle;

            return(simpleMovie);
        }