コード例 #1
0
    void FillGrid_Subscription()
    {
        if ((string)Session["AdminSessionID"] != null)
        {
            string xCode = Session["AdminSessionID"].ToString();

            SqlDataAdapter GDA = new SqlDataAdapter(" " +

                                                    " select Code, Email, SubscribeDate=Convert(varchar(11),SubscribeDate,113) " +
                                                    " from fp_Subscription order by SubscribeDate desc  " +
                                                    "  ", Con);

            DataSet GDS = new DataSet();
            Con.Open();
            GDA.Fill(GDS);
            Con.Close();

            GridViewSubscription.DataSource = GDS;
            GridViewSubscription.DataBind();
        }
        else
        {
            Response.Redirect("SessionExpired.aspx");
        }
    }
コード例 #2
0
 protected void OnPaging(object sender, GridViewPageEventArgs e)
 {
     GridViewSubscription.PageIndex = e.NewPageIndex;
     GridViewSubscription.DataBind();
     FillGrid_Subscription();
 }