Пример #1
0
        // list the most recent orders
        protected void byRecentGo_Click(object sender, EventArgs e)
        {
            // how many orders to list?
            int recordCount;

            // load the new data into the grid
            if (int.TryParse(recentCountTextBox.Text, out recordCount))
            {
                grid.DataSource = OrdersAccess.GetByRecent(recordCount);
            }
            errorLabel.Text = "Моля въведете валиден номер!";
            // refresh the data grid
            grid.DataBind();
        }
Пример #2
0
    // list the most recent orders
    protected void byRecentGo_Click(object sender, EventArgs e)
    {
        // how many orders to list?
        int recordCount;

        // load the new data into the grid
        if (int.TryParse(recentCountTextBox.Text, out recordCount))
        {
            grid.DataSource = OrdersAccess.GetByRecent(recordCount);
        }
        else
        {
            errorLabel.Text = "Please enter a valid number!";
        }
        // refresh the data grid
        grid.DataBind();
    }