Created
July 11, 2013 18:02
-
-
Save amcoder/5977715 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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