Beispiel #1
0
 /// <summary>
 /// Sets output parameters' values of the given sql command to the given db param collection
 /// </summary>
 /// <param name="command"></param>
 /// <param name="paramCollection"></param>
 private static void SetOutputValues(SqlCommand command, DBParamCollection paramCollection)
 {
     foreach (SqlParameter commandParam in command.Parameters)
     {
         if (commandParam.Direction == ParameterDirection.Output
             || commandParam.Direction == ParameterDirection.InputOutput
             || commandParam.Direction == ParameterDirection.ReturnValue)
         {
             paramCollection.SetParamValue(commandParam.ParameterName, commandParam.Value);
         }
     }
 }