Ejemplo n.º 1
0
 protected void HotelGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     HotelGridView.PageIndex = e.NewPageIndex;
     if (Session["HOTELDS"] != null)
     {
         DataSet dsHotel = (DataSet)Session["HOTELDS"];
         HotelGridView.DataSource = dsHotel;
         HotelGridView.DataBind();
     }
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                HotelManager hotelManager = new HotelManager();
                DataSet      hotelDS      = hotelManager.GetAllHotels();

                if (Session["HOTELDS"] == null)
                {
                    Session["HOTELDS"] = hotelDS;
                }

                HotelGridView.AutoGenerateColumns = true;
                HotelGridView.DataSource          = hotelDS;
                HotelGridView.DataBind();
            }
        }