// 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(); }
// 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(); }