예제 #1
0
 /// <summary>Archives a BlockOrder record.</summary>
 /// <param name="transaction">Commits or rejects a set of commands as a unit</param>
 /// <param name="RowVersion">The version number of this row.</param>
 /// <param name="blockOrderId">The value for the BlockOrderId column.</param>
 /// <param name="archive">true to archive the object, false to unarchive it.</param>
 public static void Archive(AdoTransaction adoTransaction, SqlTransaction sqlTransaction, long rowVersion, int blockOrderId)
 {
     // Accessor for the BlockOrder Table.
     ServerDataModel.BlockOrderDataTable blockOrderTable = ServerDataModel.BlockOrder;
     // Rule #1: Make sure the record exists before updating it.
     ServerDataModel.BlockOrderRow blockOrderRow = blockOrderTable.FindByBlockOrderId(blockOrderId);
     if ((blockOrderRow == null))
     {
         throw new Exception(string.Format("The BlockOrder table does not have an element identified by {0}", blockOrderId));
     }
     // Rule #2: Optimistic Concurrency Check
     if ((blockOrderRow.RowVersion != rowVersion))
     {
         throw new System.Exception("This record is busy.  Please try again later.");
     }
     // Archive the child records.
     for (int index = 0; (index < blockOrderRow.GetAllocationRows().Length); index = (index + 1))
     {
         ServerDataModel.AllocationRow childAllocationRow = blockOrderRow.GetAllocationRows()[index];
         Allocation.Archive(adoTransaction, sqlTransaction, childAllocationRow.RowVersion, childAllocationRow.AllocationId);
     }
     for (int index = 0; (index < blockOrderRow.GetBlockOrderTreeRowsByFKBlockOrderBlockOrderTreeChildId().Length); index = (index + 1))
     {
         ServerDataModel.BlockOrderTreeRow childBlockOrderTreeRow = blockOrderRow.GetBlockOrderTreeRowsByFKBlockOrderBlockOrderTreeChildId()[index];
         BlockOrderTree.Archive(adoTransaction, sqlTransaction, childBlockOrderTreeRow.RowVersion, childBlockOrderTreeRow.ParentId, childBlockOrderTreeRow.ChildId);
     }
     for (int index = 0; (index < blockOrderRow.GetBlockOrderTreeRowsByFKBlockOrderBlockOrderTreeParentId().Length); index = (index + 1))
     {
         ServerDataModel.BlockOrderTreeRow childBlockOrderTreeRow = blockOrderRow.GetBlockOrderTreeRowsByFKBlockOrderBlockOrderTreeParentId()[index];
         BlockOrderTree.Archive(adoTransaction, sqlTransaction, childBlockOrderTreeRow.RowVersion, childBlockOrderTreeRow.ParentId, childBlockOrderTreeRow.ChildId);
     }
     for (int index = 0; (index < blockOrderRow.GetExecutionRows().Length); index = (index + 1))
     {
         ServerDataModel.ExecutionRow childExecutionRow = blockOrderRow.GetExecutionRows()[index];
         Execution.Archive(adoTransaction, sqlTransaction, childExecutionRow.RowVersion, childExecutionRow.ExecutionId);
     }
     for (int index = 0; (index < blockOrderRow.GetOrderRows().Length); index = (index + 1))
     {
         ServerDataModel.OrderRow childOrderRow = blockOrderRow.GetOrderRows()[index];
         Order.Archive(adoTransaction, sqlTransaction, childOrderRow.RowVersion, childOrderRow.OrderId);
     }
     for (int index = 0; (index < blockOrderRow.GetPlacementRows().Length); index = (index + 1))
     {
         ServerDataModel.PlacementRow childPlacementRow = blockOrderRow.GetPlacementRows()[index];
         Placement.Archive(adoTransaction, sqlTransaction, childPlacementRow.RowVersion, childPlacementRow.PlacementId);
     }
     // Increment the row version
     rowVersion = ServerDataModel.RowVersion.Increment();
     // Delete the record in the ADO database.
     blockOrderRow[blockOrderTable.RowVersionColumn] = rowVersion;
     adoTransaction.DataRows.Add(blockOrderRow);
     blockOrderRow.Delete();
     // Archive the record in the SQL database.
     SqlCommand sqlCommand = new SqlCommand("update \"BlockOrder\" set \"IsArchived\" = 1 where \"BlockOrderId\"=@blockOrderId");
     sqlCommand.Connection = sqlTransaction.Connection;
     sqlCommand.Transaction = sqlTransaction;
     sqlCommand.Parameters.Add(new SqlParameter("@blockOrderId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, blockOrderId));
     sqlCommand.ExecuteNonQuery();
 }
예제 #2
0
 /// <summary>Inserts a BlockOrder record.</summary>
 /// <param name="transaction">Commits or rejects a set of commands as a unit</param>
 /// <param name="blotterId">The value for the BlotterId column.</param>
 /// <param name="accountId">The value for the AccountId column.</param>
 /// <param name="securityId">The value for the SecurityId column.</param>
 /// <param name="settlementId">The value for the SettlementId column.</param>
 /// <param name="brokerId">The value for the BrokerId column.</param>
 /// <param name="statusCode">The value for the StatusCode column.</param>
 /// <param name="transactionTypeCode">The value for the TransactionTypeCode column.</param>
 /// <param name="timeInForceCode">The value for the TimeInForceCode column.</param>
 /// <param name="orderTypeCode">The value for the OrderTypeCode column.</param>
 /// <param name="conditionCode">The value for the ConditionCode column.</param>
 /// <param name="isDeleted">The value for the IsDeleted column.</param>
 /// <param name="isAgency">The value for the IsAgency column.</param>
 /// <param name="quantityExecuted">The value for the QuantityExecuted column.</param>
 /// <param name="quantityOrdered">The value for the QuantityOrdered column.</param>
 /// <param name="price1">The value for the Price1 column.</param>
 /// <param name="price2">The value for the Price2 column.</param>
 /// <param name="createdTime">The value for the CreatedTime column.</param>
 /// <param name="createdUserId">The value for the CreatedUserId column.</param>
 /// <param name="modifiedTime">The value for the ModifiedTime column.</param>
 /// <param name="modifiedUserId">The value for the ModifiedUserId column.</param>
 public static int Insert(
             AdoTransaction adoTransaction, 
             SqlTransaction sqlTransaction, 
             ref long rowVersion, 
             int blotterId, 
             object accountId, 
             int securityId, 
             int settlementId, 
             object brokerId, 
             int statusCode, 
             int transactionTypeCode, 
             object timeInForceCode, 
             object orderTypeCode, 
             object conditionCode, 
             object isDeleted, 
             object isAgency, 
             object quantityExecuted, 
             object quantityOrdered, 
             object price1, 
             object price2, 
             System.DateTime createdTime, 
             int createdUserId, 
             System.DateTime modifiedTime, 
             int modifiedUserId)
 {
     // Accessor for the BlockOrder Table.
     ServerDataModel.BlockOrderDataTable blockOrderTable = ServerDataModel.BlockOrder;
     // Apply Defaults
     if ((accountId == null))
     {
         accountId = System.DBNull.Value;
     }
     if ((brokerId == null))
     {
         brokerId = System.DBNull.Value;
     }
     if ((timeInForceCode == null))
     {
         timeInForceCode = System.DBNull.Value;
     }
     if ((orderTypeCode == null))
     {
         orderTypeCode = System.DBNull.Value;
     }
     if ((conditionCode == null))
     {
         conditionCode = System.DBNull.Value;
     }
     if ((isDeleted == null))
     {
         isDeleted = false;
     }
     if ((isAgency == null))
     {
         isAgency = false;
     }
     if ((quantityExecuted == null))
     {
         quantityExecuted = System.DBNull.Value;
     }
     if ((quantityOrdered == null))
     {
         quantityOrdered = System.DBNull.Value;
     }
     if ((price1 == null))
     {
         price1 = System.DBNull.Value;
     }
     if ((price2 == null))
     {
         price2 = System.DBNull.Value;
     }
     // Increment the row version
     rowVersion = ServerDataModel.RowVersion.Increment();
     // Insert the record into the ADO database.
     ServerDataModel.BlockOrderRow blockOrderRow = blockOrderTable.NewBlockOrderRow();
     blockOrderRow[blockOrderTable.RowVersionColumn] = rowVersion;
     blockOrderRow[blockOrderTable.BlotterIdColumn] = blotterId;
     blockOrderRow[blockOrderTable.AccountIdColumn] = accountId;
     blockOrderRow[blockOrderTable.SecurityIdColumn] = securityId;
     blockOrderRow[blockOrderTable.SettlementIdColumn] = settlementId;
     blockOrderRow[blockOrderTable.BrokerIdColumn] = brokerId;
     blockOrderRow[blockOrderTable.StatusCodeColumn] = statusCode;
     blockOrderRow[blockOrderTable.TransactionTypeCodeColumn] = transactionTypeCode;
     blockOrderRow[blockOrderTable.TimeInForceCodeColumn] = timeInForceCode;
     blockOrderRow[blockOrderTable.OrderTypeCodeColumn] = orderTypeCode;
     blockOrderRow[blockOrderTable.ConditionCodeColumn] = conditionCode;
     blockOrderRow[blockOrderTable.IsDeletedColumn] = isDeleted;
     blockOrderRow[blockOrderTable.IsAgencyColumn] = isAgency;
     blockOrderRow[blockOrderTable.QuantityExecutedColumn] = quantityExecuted;
     blockOrderRow[blockOrderTable.QuantityOrderedColumn] = quantityOrdered;
     blockOrderRow[blockOrderTable.Price1Column] = price1;
     blockOrderRow[blockOrderTable.Price2Column] = price2;
     blockOrderRow[blockOrderTable.CreatedTimeColumn] = createdTime;
     blockOrderRow[blockOrderTable.CreatedUserIdColumn] = createdUserId;
     blockOrderRow[blockOrderTable.ModifiedTimeColumn] = modifiedTime;
     blockOrderRow[blockOrderTable.ModifiedUserIdColumn] = modifiedUserId;
     blockOrderTable.AddBlockOrderRow(blockOrderRow);
     adoTransaction.DataRows.Add(blockOrderRow);
     // Insert the record into the SQL database.
     SqlCommand sqlCommand = new SqlCommand(@"insert ""BlockOrder"" (""rowVersion"",""BlockOrderId"",""BlotterId"",""AccountId"",""SecurityId"",""SettlementId"",""BrokerId"",""StatusCode"",""TransactionTypeCode"",""TimeInForceCode"",""OrderTypeCode"",""ConditionCode"",""IsDeleted"",""IsAgency"",""QuantityExecuted"",""QuantityOrdered"",""Price1"",""Price2"",""CreatedTime"",""CreatedUserId"",""ModifiedTime"",""ModifiedUserId"") values (@rowVersion,@blockOrderId,@blotterId,@accountId,@securityId,@settlementId,@brokerId,@statusCode,@transactionTypeCode,@timeInForceCode,@orderTypeCode,@conditionCode,@isDeleted,@isAgency,@quantityExecuted,@quantityOrdered,@price1,@price2,@createdTime,@createdUserId,@modifiedTime,@modifiedUserId)");
     sqlCommand.Connection = sqlTransaction.Connection;
     sqlCommand.Transaction = sqlTransaction;
     sqlCommand.Parameters.Add(new SqlParameter("@rowVersion", SqlDbType.BigInt, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, rowVersion));
     sqlCommand.Parameters.Add(new SqlParameter("@blockOrderId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, blockOrderRow[blockOrderTable.BlockOrderIdColumn]));
     sqlCommand.Parameters.Add(new SqlParameter("@blotterId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, blotterId));
     sqlCommand.Parameters.Add(new SqlParameter("@accountId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, accountId));
     sqlCommand.Parameters.Add(new SqlParameter("@securityId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, securityId));
     sqlCommand.Parameters.Add(new SqlParameter("@settlementId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, settlementId));
     sqlCommand.Parameters.Add(new SqlParameter("@brokerId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, brokerId));
     sqlCommand.Parameters.Add(new SqlParameter("@statusCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, statusCode));
     sqlCommand.Parameters.Add(new SqlParameter("@transactionTypeCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, transactionTypeCode));
     sqlCommand.Parameters.Add(new SqlParameter("@timeInForceCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, timeInForceCode));
     sqlCommand.Parameters.Add(new SqlParameter("@orderTypeCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, orderTypeCode));
     sqlCommand.Parameters.Add(new SqlParameter("@conditionCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, conditionCode));
     sqlCommand.Parameters.Add(new SqlParameter("@isDeleted", SqlDbType.Bit, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, isDeleted));
     sqlCommand.Parameters.Add(new SqlParameter("@isAgency", SqlDbType.Bit, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, isAgency));
     sqlCommand.Parameters.Add(new SqlParameter("@quantityExecuted", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, quantityExecuted));
     sqlCommand.Parameters.Add(new SqlParameter("@quantityOrdered", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, quantityOrdered));
     sqlCommand.Parameters.Add(new SqlParameter("@price1", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, price1));
     sqlCommand.Parameters.Add(new SqlParameter("@price2", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, price2));
     sqlCommand.Parameters.Add(new SqlParameter("@createdTime", SqlDbType.DateTime, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, createdTime));
     sqlCommand.Parameters.Add(new SqlParameter("@createdUserId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, createdUserId));
     sqlCommand.Parameters.Add(new SqlParameter("@modifiedTime", SqlDbType.DateTime, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, modifiedTime));
     sqlCommand.Parameters.Add(new SqlParameter("@modifiedUserId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, modifiedUserId));
     sqlCommand.ExecuteNonQuery();
     // Return Statements
     return blockOrderRow.BlockOrderId;
 }
예제 #3
0
 /// <summary>Updates a BlockOrder record.</summary>
 /// <param name="transaction">Commits or rejects a set of commands as a unit</param>
 /// <param name="rowVersion">The version number of the row</param>
 /// <param name="blockOrderId">The value for the BlockOrderId column.</param>
 /// <param name="blotterId">The value for the BlotterId column.</param>
 /// <param name="accountId">The value for the AccountId column.</param>
 /// <param name="securityId">The value for the SecurityId column.</param>
 /// <param name="settlementId">The value for the SettlementId column.</param>
 /// <param name="brokerId">The value for the BrokerId column.</param>
 /// <param name="statusCode">The value for the StatusCode column.</param>
 /// <param name="transactionTypeCode">The value for the TransactionTypeCode column.</param>
 /// <param name="timeInForceCode">The value for the TimeInForceCode column.</param>
 /// <param name="orderTypeCode">The value for the OrderTypeCode column.</param>
 /// <param name="conditionCode">The value for the ConditionCode column.</param>
 /// <param name="isDeleted">The value for the IsDeleted column.</param>
 /// <param name="isAgency">The value for the IsAgency column.</param>
 /// <param name="quantityExecuted">The value for the QuantityExecuted column.</param>
 /// <param name="quantityOrdered">The value for the QuantityOrdered column.</param>
 /// <param name="price1">The value for the Price1 column.</param>
 /// <param name="price2">The value for the Price2 column.</param>
 /// <param name="createdTime">The value for the CreatedTime column.</param>
 /// <param name="createdUserId">The value for the CreatedUserId column.</param>
 /// <param name="modifiedTime">The value for the ModifiedTime column.</param>
 /// <param name="modifiedUserId">The value for the ModifiedUserId column.</param>
 public static void Update(
             AdoTransaction adoTransaction, 
             SqlTransaction sqlTransaction, 
             ref long rowVersion, 
             int blockOrderId, 
             object blotterId, 
             object accountId, 
             object securityId, 
             object settlementId, 
             object brokerId, 
             object statusCode, 
             object transactionTypeCode, 
             object timeInForceCode, 
             object orderTypeCode, 
             object conditionCode, 
             object isDeleted, 
             object isAgency, 
             object quantityExecuted, 
             object quantityOrdered, 
             object price1, 
             object price2, 
             object createdTime, 
             object createdUserId, 
             object modifiedTime, 
             object modifiedUserId)
 {
     // Accessor for the BlockOrder Table.
     ServerDataModel.BlockOrderDataTable blockOrderTable = ServerDataModel.BlockOrder;
     // Rule #1: Make sure the record exists before updating it.
     ServerDataModel.BlockOrderRow blockOrderRow = blockOrderTable.FindByBlockOrderId(blockOrderId);
     if ((blockOrderRow == null))
     {
         throw new Exception(string.Format("The BlockOrder table does not have an element identified by {0}", blockOrderId));
     }
     // Rule #2: Optimistic Concurrency Check
     if ((blockOrderRow.RowVersion != rowVersion))
     {
         throw new System.Exception("This record is busy.  Please try again later.");
     }
     // Apply Defaults
     if ((blotterId == null))
     {
         blotterId = blockOrderRow[blockOrderTable.BlotterIdColumn];
     }
     if ((accountId == null))
     {
         accountId = blockOrderRow[blockOrderTable.AccountIdColumn];
     }
     if ((securityId == null))
     {
         securityId = blockOrderRow[blockOrderTable.SecurityIdColumn];
     }
     if ((settlementId == null))
     {
         settlementId = blockOrderRow[blockOrderTable.SettlementIdColumn];
     }
     if ((brokerId == null))
     {
         brokerId = blockOrderRow[blockOrderTable.BrokerIdColumn];
     }
     if ((statusCode == null))
     {
         statusCode = blockOrderRow[blockOrderTable.StatusCodeColumn];
     }
     if ((transactionTypeCode == null))
     {
         transactionTypeCode = blockOrderRow[blockOrderTable.TransactionTypeCodeColumn];
     }
     if ((timeInForceCode == null))
     {
         timeInForceCode = blockOrderRow[blockOrderTable.TimeInForceCodeColumn];
     }
     if ((orderTypeCode == null))
     {
         orderTypeCode = blockOrderRow[blockOrderTable.OrderTypeCodeColumn];
     }
     if ((conditionCode == null))
     {
         conditionCode = blockOrderRow[blockOrderTable.ConditionCodeColumn];
     }
     if ((isDeleted == null))
     {
         isDeleted = blockOrderRow[blockOrderTable.IsDeletedColumn];
     }
     if ((isAgency == null))
     {
         isAgency = blockOrderRow[blockOrderTable.IsAgencyColumn];
     }
     if ((quantityExecuted == null))
     {
         quantityExecuted = blockOrderRow[blockOrderTable.QuantityExecutedColumn];
     }
     if ((quantityOrdered == null))
     {
         quantityOrdered = blockOrderRow[blockOrderTable.QuantityOrderedColumn];
     }
     if ((price1 == null))
     {
         price1 = blockOrderRow[blockOrderTable.Price1Column];
     }
     if ((price2 == null))
     {
         price2 = blockOrderRow[blockOrderTable.Price2Column];
     }
     if ((createdTime == null))
     {
         createdTime = blockOrderRow[blockOrderTable.CreatedTimeColumn];
     }
     if ((createdUserId == null))
     {
         createdUserId = blockOrderRow[blockOrderTable.CreatedUserIdColumn];
     }
     if ((modifiedTime == null))
     {
         modifiedTime = blockOrderRow[blockOrderTable.ModifiedTimeColumn];
     }
     if ((modifiedUserId == null))
     {
         modifiedUserId = blockOrderRow[blockOrderTable.ModifiedUserIdColumn];
     }
     // Increment the row version
     rowVersion = ServerDataModel.RowVersion.Increment();
     // Update the record in the ADO database.
     blockOrderRow[blockOrderTable.RowVersionColumn] = rowVersion;
     blockOrderRow[blockOrderTable.BlotterIdColumn] = blotterId;
     blockOrderRow[blockOrderTable.AccountIdColumn] = accountId;
     blockOrderRow[blockOrderTable.SecurityIdColumn] = securityId;
     blockOrderRow[blockOrderTable.SettlementIdColumn] = settlementId;
     blockOrderRow[blockOrderTable.BrokerIdColumn] = brokerId;
     blockOrderRow[blockOrderTable.StatusCodeColumn] = statusCode;
     blockOrderRow[blockOrderTable.TransactionTypeCodeColumn] = transactionTypeCode;
     blockOrderRow[blockOrderTable.TimeInForceCodeColumn] = timeInForceCode;
     blockOrderRow[blockOrderTable.OrderTypeCodeColumn] = orderTypeCode;
     blockOrderRow[blockOrderTable.ConditionCodeColumn] = conditionCode;
     blockOrderRow[blockOrderTable.IsDeletedColumn] = isDeleted;
     blockOrderRow[blockOrderTable.IsAgencyColumn] = isAgency;
     blockOrderRow[blockOrderTable.QuantityExecutedColumn] = quantityExecuted;
     blockOrderRow[blockOrderTable.QuantityOrderedColumn] = quantityOrdered;
     blockOrderRow[blockOrderTable.Price1Column] = price1;
     blockOrderRow[blockOrderTable.Price2Column] = price2;
     blockOrderRow[blockOrderTable.CreatedTimeColumn] = createdTime;
     blockOrderRow[blockOrderTable.CreatedUserIdColumn] = createdUserId;
     blockOrderRow[blockOrderTable.ModifiedTimeColumn] = modifiedTime;
     blockOrderRow[blockOrderTable.ModifiedUserIdColumn] = modifiedUserId;
     adoTransaction.DataRows.Add(blockOrderRow);
     // Update the record in the SQL database.
     SqlCommand sqlCommand = new SqlCommand(@"update ""BlockOrder"" set ""RowVersion""=@rowVersion,""BlotterId""=@blotterId,""AccountId""=@accountId,""SecurityId""=@securityId,""SettlementId""=@settlementId,""BrokerId""=@brokerId,""StatusCode""=@statusCode,""TransactionTypeCode""=@transactionTypeCode,""TimeInForceCode""=@timeInForceCode,""OrderTypeCode""=@orderTypeCode,""ConditionCode""=@conditionCode,""IsDeleted""=@isDeleted,""IsAgency""=@isAgency,""QuantityExecuted""=@quantityExecuted,""QuantityOrdered""=@quantityOrdered,""Price1""=@price1,""Price2""=@price2,""CreatedTime""=@createdTime,""CreatedUserId""=@createdUserId,""ModifiedTime""=@modifiedTime,""ModifiedUserId""=@modifiedUserId where ""BlockOrderId""=@blockOrderId");
     sqlCommand.Connection = sqlTransaction.Connection;
     sqlCommand.Transaction = sqlTransaction;
     sqlCommand.Parameters.Add(new SqlParameter("@rowVersion", SqlDbType.BigInt, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, rowVersion));
     sqlCommand.Parameters.Add(new SqlParameter("@blockOrderId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, blockOrderId));
     sqlCommand.Parameters.Add(new SqlParameter("@blotterId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, blotterId));
     sqlCommand.Parameters.Add(new SqlParameter("@accountId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, accountId));
     sqlCommand.Parameters.Add(new SqlParameter("@securityId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, securityId));
     sqlCommand.Parameters.Add(new SqlParameter("@settlementId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, settlementId));
     sqlCommand.Parameters.Add(new SqlParameter("@brokerId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, brokerId));
     sqlCommand.Parameters.Add(new SqlParameter("@statusCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, statusCode));
     sqlCommand.Parameters.Add(new SqlParameter("@transactionTypeCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, transactionTypeCode));
     sqlCommand.Parameters.Add(new SqlParameter("@timeInForceCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, timeInForceCode));
     sqlCommand.Parameters.Add(new SqlParameter("@orderTypeCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, orderTypeCode));
     sqlCommand.Parameters.Add(new SqlParameter("@conditionCode", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, conditionCode));
     sqlCommand.Parameters.Add(new SqlParameter("@isDeleted", SqlDbType.Bit, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, isDeleted));
     sqlCommand.Parameters.Add(new SqlParameter("@isAgency", SqlDbType.Bit, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, isAgency));
     sqlCommand.Parameters.Add(new SqlParameter("@quantityExecuted", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, quantityExecuted));
     sqlCommand.Parameters.Add(new SqlParameter("@quantityOrdered", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, quantityOrdered));
     sqlCommand.Parameters.Add(new SqlParameter("@price1", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, price1));
     sqlCommand.Parameters.Add(new SqlParameter("@price2", SqlDbType.Decimal, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, price2));
     sqlCommand.Parameters.Add(new SqlParameter("@createdTime", SqlDbType.DateTime, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, createdTime));
     sqlCommand.Parameters.Add(new SqlParameter("@createdUserId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, createdUserId));
     sqlCommand.Parameters.Add(new SqlParameter("@modifiedTime", SqlDbType.DateTime, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, modifiedTime));
     sqlCommand.Parameters.Add(new SqlParameter("@modifiedUserId", SqlDbType.Int, 0, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Current, modifiedUserId));
     // Update the record in the SQL database.
     sqlCommand.ExecuteNonQuery();
 }