protected void Search_btn_Click(object sender, EventArgs e)
        {
            if (Genrelist.SelectedValue != "Select Genre" && !string.IsNullOrEmpty(Moviename_tb.Text))
            {
                ClearListView();

                int    genre = Genrelist.SelectedIndex;
                string title = Moviename_tb.Text;
                MovieContainer.MovieInfo().Clear();
                PopulateListView(MovieContainer.MovieByNameAndGenre(genre, title));
            }
            else if (Genrelist.SelectedValue != "Select Genre" && string.IsNullOrEmpty(Moviename_tb.Text))
            {
                ClearListView();

                int genre = Genrelist.SelectedIndex;
                MovieContainer.MovieInfo().Clear();
                PopulateListView(MovieContainer.MovieByGenre(genre));
            }
            else if (Genrelist.SelectedValue == "Select Genre" && !string.IsNullOrEmpty(Moviename_tb.Text))
            {
                ClearListView();

                string title = Moviename_tb.Text;
                MovieContainer.MovieInfo().Clear();
                PopulateListView(MovieContainer.MovieByName(title));
            }
            else
            {
                return;
            }
        }
Exemple #2
0
        protected void Filter_btn_Click(object sender, EventArgs e)
        {
            int timespan = TimeSpanList.SelectedIndex;

            if (timespan != 0)
            {
                if (timespan == 1)
                {
                    ClearListView();
                    PopulateListView(MovieContainer.DisplayTopTenDay());
                }
                else if (timespan == 2)
                {
                    ClearListView();
                    PopulateListView(MovieContainer.DisplayTopTenWeek());
                }
                else if (timespan == 3)
                {
                    ClearListView();
                    PopulateListView(MovieContainer.DisplayTopTenMonth());
                }
                else
                {
                    return;
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Session.Clear();
     if (!Page.IsPostBack)
     {
         PopulateListView(MovieContainer.MovieInfo());
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("WRITE TO THE OUTPUT " + Session["value"]);

            if (Session["value"] != null)
            {
                string movie = Session["value"].ToString();
                PopulateListView(MovieContainer.GetSpecificMovieInfo(movie));
            }
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Show Top 10
            PopulateListView(MovieContainer.DisplayTopTen());

            // Show commercial randomly
            Cmc_lb.Text = GenerateRandomCommercial();

            //	private Commercials[] info = commercial.CommercialInfo();
            // XSLT transform and xml data to DB
            //DayTimerCall();
        }
        public void Opinion_Click(object sender, EventArgs args)
        {
            LikesAndDislikes lad = new LikesAndDislikes(Session["value"].ToString());
            Button           btn = sender as Button;

            if ((sender as Button).Text == "LIKE")
            {
                lad.LikeIncrement();
                PopulateListView(MovieContainer.GetSpecificMovieInfo(Session["value"].ToString()));
            }
            else
            {
                lad.DislikeIncrement();
                PopulateListView(MovieContainer.GetSpecificMovieInfo(Session["value"].ToString()));
            }
        }