Code to execute a stored procedure

/// <summary>
/// Executes SP CustOrderHist with parameter
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ExecuteSpButton_Click(object sender, EventArgs e)
{
  // Create a new instance of CustOrderHist
  Northwind.Business.Procedures.dbo.CustOrderHist sp 
  = new Northwind.Business.Procedures.dbo.CustOrderHist();
  // Fill a DataGridView with the collection obtained according with texbot content
  MainDataGridView.DataSource = sp.Items(CustomerTextBox.Text.Trim());
}

Last edited Nov 29, 2015 at 10:21 PM by cdcespon, version 2