Beispiel #1
0
        protected void GridViewFavorite_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridViewRow    row = GridViewFavorite.SelectedRow;
            string         selectedMovieTitle = row.Cells[0].Text;
            GridUpdateArgs gua = new GridUpdateArgs();

            gua.ID       = selectedMovieTitle;
            gua.UserName = System.Web.HttpContext.Current.User.Identity.Name;
            if (RemoveMovie != null)
            {
                RemoveMovie(gua);
                if (Model.IsValidTransastion == true)
                {
                    var ex = new LoadDataArgs();
                    ex.UserName = System.Web.HttpContext.Current.User.Identity.Name;
                    LoadData(ex);
                    GridViewFavorite.DataSource = Model.ListOfFavorites;
                    GridViewFavorite.DataBind();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (this.LoadData != null)
                {
                    var ex = new EventArgs();
                    LoadData(ex);
                }
                // Label1.Text = "it works, yeah!!!!";

                GridViewComments.DataSource = Model.ListOfComments;
                GridViewComments.DataBind();

                GridViewRating.DataSource = Model.ListOfRatings;
                GridViewRating.DataBind();

                GridViewFavorite.DataSource = Model.ListOfFavorites;
                GridViewFavorite.DataBind();
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (this.LoadData != null)
                {
                    var ex = new LoadDataArgs();
                    ex.UserName = System.Web.HttpContext.Current.User.Identity.Name;
                    LoadData(ex);
                }

                GridViewRating.DataSource = Model.ListOfRatings;
                GridViewRating.DataBind();

                GridViewFavorite.DataSource = Model.ListOfFavorites;
                GridViewFavorite.DataBind();

                PopulateTreeView();
                trvComments.CollapseAll();
            }
        }