示例#1
0
 public virtual void DeleteObject(int iObjectID, DbTransaction transaction)
 {
     try
     {
         DbCommand storedProcedure = SqlDatabaseHelper.GetStoredProcedure(this.GenerateDeleteStoredProcedureName());
         SqlDatabaseHelper.AddInParameter(storedProcedure, SqlDatabaseHelper.GetPrimaryKeyColumn(this.TableName), SqlDbType.Int, (object)iObjectID);
         storedProcedure.Transaction = transaction;
         SqlDatabaseHelper.RunStoredProcedure(storedProcedure);
         SqlDatabaseHelper.CommitTransaction(transaction);
     }
     catch (Exception ex)
     {
         SqlDatabaseHelper.RollbackTransaction(transaction);
     }
 }
示例#2
0
 public void CommitTransaction(DbTransaction transaction)
 {
     SqlDatabaseHelper.CommitTransaction(transaction);
 }