コード例 #1
0
 protected void UpdatePanel1_Load(object sender, EventArgs e)
 {
     //Populate Orders grid
     Order order = new Order();
     DataTable dataTable = order.ToDataTable(order.GetAllOrders());
     GridViewOrders.DataSource = dataTable;
     GridViewOrders.DataBind();
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] == null)
                Response.Redirect("~/Login.aspx");
            else
            {
                Order ord = new Order();
                HistoryGrid.DataSource = ord.ToDataTable(ord.GetAllOrdersByUserID(Convert.ToInt32(Session["UserID"])));
                DataBind();

                if (!Page.IsPostBack)
                {

                }
            }
        }