コード例 #1
0
 protected void GridViewPhoto_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     LoadAllStory();
     LoadAllStoryPhoto();
     GridViewPhoto.PageIndex = e.NewPageIndex;
     GridViewPhoto.DataBind();
 }
        protected void LoadPhotoById(int id)
        {
            DataTable dt = new DataTable();

            dt = dalAP.SelectInformationByAchievementId(id);
            GridViewPhoto.DataSource = dt;
            GridViewPhoto.DataBind();
        }
        protected void LoadAllAchievementPhoto()
        {
            DataTable dt = new DataTable();

            dt = dalAP.SelectAllInformation();
            GridViewPhoto.DataSource = dt;
            GridViewPhoto.DataBind();
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable panelPopup = new DataTable();

            panelPopup.Columns.Add("Input");
            panelPopup.Columns.Add("Name");
            panelPopup.Columns.Add("Output");

            createActionTable("User", panelPopup);
            GridViewUser.DataSource = panelPopup;
            GridViewUser.DataBind();

            panelPopup.Clear();
            createActionTable("Friend", panelPopup);
            GridViewFriends.DataSource = panelPopup;
            GridViewFriends.DataBind();

            panelPopup.Clear();
            createActionTable("Album", panelPopup);
            GridViewAlbum.DataSource = panelPopup;
            GridViewAlbum.DataBind();

            panelPopup.Clear();
            createActionTable("Photo", panelPopup);
            GridViewPhoto.DataSource = panelPopup;
            GridViewPhoto.DataBind();

            panelPopup.Clear();
            createActionTable("Post", panelPopup);
            GridViewPost.DataSource = panelPopup;
            GridViewPost.DataBind();

            panelPopup.Clear();
            createActionTable("Video", panelPopup);
            GridViewVideo.DataSource = panelPopup;
            GridViewVideo.DataBind();

            panelPopup.Clear();
            createActionTable("Like", panelPopup);
            GridViewLike.DataSource = panelPopup;
            GridViewLike.DataBind();

            panelPopup.Clear();
            createActionTable("Comment", panelPopup);
            GridViewComment.DataSource = panelPopup;
            GridViewComment.DataBind();
        }
コード例 #5
0
        protected void LoadAllStoryPhoto()
        {
            DataTable dt = new DataTable();

            if (Session["user_role"].Equals("user"))
            {
                dt = dalSP.SelectInformationByUserId(Int32.Parse(Session["user_id"].ToString()));
                GridViewPhoto.DataSource = dt;
                GridViewPhoto.DataBind();
            }
            else
            {
                dt = dalSP.SelectAllInformation();
                GridViewPhoto.DataSource = dt;
                GridViewPhoto.DataBind();
            }
        }