SqlCommand cmdNew = new SqlCommand("ProcessNewOrder",
this.sqlConnection1); SqlDataAdapter sdaNew = new SqlDataAdapter(cmdNew);
// Let the SQL command know the type of command we are
going to use // In this case, it is a stored procedure cmdNew.CommandType = CommandType.StoredProcedure;
// We will need a SQL parameter to carry the arguments
// Declare its variable SqlParameter parNew = new SqlParameter(); // Specify the name of the argument parNew.ParameterName = "@ProcessedBy"; // Specify the SQL data type of the argument parNew.SqlDbType = SqlDbType.Int; // Specify the value passed as argument parNew.Value = this.cboProcessedBy.SelectedIndex;
// Once the argument is ready, add it to the list of arguments