コード例 #1
0
ファイル: NeoInfo.aspx.cs プロジェクト: ak5467/Neo4j
        public void DisplayMovieInfo(MovieDim Movie, double Rating)
        {
            moviePanel1.CssClass = "alignClass";
            //adding movie name
            Label label1 = new Label();

            label1.Text      = Movie.Title;
            label1.Font.Name = "Cursive";
            label1.Font.Size = FontUnit.XXLarge;
            label1.ForeColor = System.Drawing.Color.DarkSlateBlue;
            moviePanel1.Controls.Add(label1);
            moviePanel1.Controls.Add(new LiteralControl("<br /><br />"));

            //adding rating
            Label ratingLabel = new Label();

            ratingLabel.Text     = "Rating: " + Rating;
            ratingLabel.CssClass = "ratingCss";
            moviePanel1.Controls.Add(ratingLabel);
            moviePanel1.Controls.Add(new LiteralControl("<br /><br />"));

            //adding Genre of the movie
            Label GenreLabel = new Label();

            GenreLabel.Text     = "Genre: " + String.Join(" | ", GenreArray);
            GenreLabel.CssClass = "ratingCss";
            moviePanel1.Controls.Add(GenreLabel);
            moviePanel1.Controls.Add(new LiteralControl("<br /><br />"));

            //adding Imdb link
            Label label2 = new Label();

            label2.Text      = "IMDB Link: ";
            label2.CssClass  = "right_align";
            label2.ForeColor = System.Drawing.Color.DarkSlateBlue;
            moviePanel1.Controls.Add(label2);
            Button linkButton1 = new Button();

            linkButton1.Text     = "https://www.imdb.com/title/tt0" + Movie.ImdbId;
            linkButton1.CssClass = "silentButton";
            linkButton1.Click   += linkButton1_Click;
            moviePanel1.Controls.Add(linkButton1);
            moviePanel1.Controls.Add(new LiteralControl("<br /><br />"));
        }
コード例 #2
0
ファイル: NeoInfo.aspx.cs プロジェクト: ak5467/Neo4j
        protected void Page_Load(object sender, EventArgs e)
        {
            int MovieSK = Convert.ToInt32(Request.QueryString["sk"]);
            int UserSK  = Convert.ToInt32(Request.QueryString["user"]);

            //get a new connection
            conn.Connection();

            //get the movie with SK
            Movie = conn.GetMovie(MovieSK);
            //find the rating of the movie
            Rating = conn.Rating(MovieSK);

            //get Genre of movie
            GenreArray = conn.GetGenre(MovieSK);

            //display the movie such as name, rating, Imdb url, genre
            DisplayMovieInfo(Movie, Rating);

            //find movies with similar rating
            List <MovieDim> UserProfileMovies = conn.MoviesBasedOnUserProfile(UserSK);

            //display movies of similar rating
            DisplayBasedUserProfile(UserProfileMovies);

            //find movies rated by same users
            List <MovieDim> SimilarUserMovie = conn.SimilarUserMovies(MovieSK, Rating);

            //display movies rated by same users
            DisplaySimilarUserMovie(SimilarUserMovie);

            //find movies in same genre
            List <MovieDim> SameGenreMovies = conn.SameGenreMovies(MovieSK);

            //display movies in same Genre
            DisplaySameGenreMovies(SameGenreMovies);

            //find movies that has similar tags based on tag relevance
            List <MovieDim> SameWeightMovies = conn.SimilarWeightedMovie(MovieSK);

            //display movies that has similar tags based on tag relevance
            DisplaySimilarWeightedMovie(SameWeightMovies);
        }