// Display the most recent orders protected void byRecentGo_Click(object sender, EventArgs e) { try { int recordCount = Int32.Parse(recentCountTextBox.Text); List <CommerceLibOrderInfo> orders = CommerceLibAccess.GetOrdersByRecent(recordCount); grid.DataSource = orders; if (orders.Count == 0) { errorLabel.Text = "Няма пъръчки."; } grid.DataBind(); } catch { errorLabel.Text = "Поисканите поръчки не бяха намерени!"; } }
protected void byRecentGo_Click(object sender, EventArgs eventArgs) { try { int recordCount = Int32.Parse(recentCountTextBox.Text); List <OrderInfo> orders = CommerceLibAccess.GetOrdersByRecent(recordCount); grid.DataSource = orders; if (orders.Count == 0) { errorLabel.Text = "No orders to get."; } grid.DataBind(); } catch (Exception e) { Utilities.LogError(e); errorLabel.Text = "Couldn't get the requested orders!"; } }
// Display the most recent orders protected void byRecentGo_Click(object sender, EventArgs e) { try { int recordCount = Int32.Parse(recentCountTextBox.Text); List <CommerceLibOrderInfo> orders = CommerceLibAccess.GetOrdersByRecent(recordCount); grid.DataSource = orders; if (orders.Count == 0) { errorLabel.Text = "<br />No orders to get."; } } catch { errorLabel.Text = "<br />Couldn't get the requested orders!"; } finally { grid.DataBind(); } }