Skip to content

Instantly share code, notes, and snippets.

@amcoder
Created July 11, 2013 18:02
Show Gist options
  • Save amcoder/5977715 to your computer and use it in GitHub Desktop.
Save amcoder/5977715 to your computer and use it in GitHub Desktop.
[WebMethod(true)]
public void EndGroundTransportationTrip(int tripId)
{
var commandText = @"GT_EndTrip";
using (TransactionScope scope = new TransactionScope())
{
using (SqlConnection connection = new SqlConnection(this.ConnectionString))
{
connection.Open();
using (SqlCommand command = new SqlCommand(commandText, connection))
{
command.CommandType = System.Data.CommandType.StoredProcedure;
command.Parameters.AddWithValue("@TripId", tripId);
command.ExecuteNonQuery();
}
}
scope.Complete();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment