protected void gvReserveOrder_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView gvReserveOrder = (sender as GridView); gvReserveOrder.PageIndex = e.NewPageIndex; ReserveOrders ro = new ReserveOrders(DateTime.Now, DateTime.Now, 0, string.Empty, string.Empty, null); gvReserveOrder.DataSource = ro.getReserveOrder(); gvReserveOrder.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txtSearch.Attributes.Add("onKeyPress", "doClick('" + btnSearch.ClientID + "',event)"); txtSearchSell.Attributes.Add("onKeyPress", "doClick('" + btnSearchSell.ClientID + "',event)"); ReserveOrders ro = new ReserveOrders(DateTime.Now, DateTime.Now, 0, string.Empty, string.Empty, null); gvReserveOrder.DataSource = ro.getReserveOrder(); gvReserveOrder.DataBind(); gvSellOrder.DataSource = ro.getSaleOrder(); gvSellOrder.DataBind(); } }