Exemplo n.º 1
0
 /// <summary>Updates a DestinationOrder record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public static void Update(ParameterList parameters)
 {
     // Accessor for the DestinationOrder Table.
     ServerMarketData.DestinationOrderDataTable destinationOrderTable = ServerMarketData.DestinationOrder;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     object canceledQuantity = parameters["canceledQuantity"].Value;
     object canceledTime = parameters["canceledTime"].Value;
     object createdTime = parameters["createdTime"].Value;
     object createdUserId = parameters["createdUserId"].Value;
     object externalDestinationId = parameters["destinationId"].Value;
     string externalDestinationOrderId = ((string)(parameters["destinationOrderId"]));
     object isCanceledByUser = parameters["isCanceledByUser"].Value;
     object isHidden = parameters["isHidden"].Value;
     object limitPrice = parameters["limitPrice"].Value;
     object modifiedTime = parameters["modifiedTime"].Value;
     object modifiedUserId = parameters["modifiedUserId"].Value;
     object orderTypeCode = parameters["orderTypeCode"].Value;
     object orderedQuantity = parameters["orderedQuantity"].Value;
     object externalPriceTypeCode = parameters["priceTypeCode"].Value;
     object externalStateCode = parameters["stateCode"].Value;
     object externalStatusCode = parameters["statusCode"].Value;
     object stopPrice = parameters["stopPrice"].Value;
     object externalTraderId = parameters["traderId"].Value;
     object externalTimeInForceCode = parameters["timeInForceCode"].Value;
     object externalWorkingOrderId = parameters["workingOrderId"].Value;
     // The row versioning is largely disabled for external operations.
     long rowVersion = long.MinValue;
     // Resolve External Identifiers
     object destinationId = Destination.FindOptionalKey(configurationId, "destinationId", externalDestinationId);
     int destinationOrderId = DestinationOrder.FindRequiredKey(configurationId, "destinationOrderId", externalDestinationOrderId);
     object priceTypeCode = PriceType.FindOptionalKey(configurationId, "priceTypeCode", externalPriceTypeCode);
     object stateCode = State.FindOptionalKey(configurationId, "stateCode", externalStateCode);
     object statusCode = Status.FindOptionalKey(configurationId, "statusCode", externalStatusCode);
     object traderId = Trader.FindOptionalKey(configurationId, "traderId", externalTraderId);
     object timeInForceCode = TimeInForce.FindOptionalKey(configurationId, "timeInForceCode", externalTimeInForceCode);
     object workingOrderId = WorkingOrder.FindOptionalKey(configurationId, "workingOrderId", externalWorkingOrderId);
     // While the optimistic concurrency checking is disabled for the external methods, the internal methods
     // still need to perform the check.  This ncurrency checking logic by finding the current row version to be
     // will bypass the coused when the internal method is called.
     ServerMarketData.DestinationOrderRow destinationOrderRow = destinationOrderTable.FindByDestinationOrderId(destinationOrderId);
     rowVersion = ((long)(destinationOrderRow[destinationOrderTable.RowVersionColumn]));
     // Call the internal method to complete the operation.
     MarkThree.Guardian.Core.DestinationOrder.Update(adoTransaction, sqlTransaction, ref rowVersion, canceledQuantity, canceledTime, createdTime, createdUserId, destinationId, destinationOrderId, null, isCanceledByUser, isHidden, limitPrice, modifiedTime, modifiedUserId, orderTypeCode, orderedQuantity, priceTypeCode, stateCode, statusCode, stopPrice, traderId, timeInForceCode, workingOrderId);
     // Return values.
     parameters["rowVersion"] = rowVersion;
 }
Exemplo n.º 2
0
 /// <summary>Updates a SourceOrder record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public static void Update(ParameterList parameters)
 {
     // Accessor for the SourceOrder Table.
     ServerMarketData.SourceOrderDataTable sourceOrderTable = ServerMarketData.SourceOrder;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     object createdTime = parameters["createdTime"].Value;
     object externalCreatedUserId = parameters["createdUserId"].Value;
     object externalDestinationId = parameters["destinationId"].Value;
     object isAdvertised = parameters["isAdvertised"].Value;
     object isAutoExecute = parameters["isAutoExecute"].Value;
     object isCanceled = parameters["isCanceled"].Value;
     object isHeld = parameters["isHeld"].Value;
     object isSteppedIn = parameters["isSteppedIn"].Value;
     object isSubmitted = parameters["isSubmitted"].Value;
     object limitPrice = parameters["limitPrice"].Value;
     object maximumVolatility = parameters["maximumVolatility"].Value;
     object modifiedTime = parameters["modifiedTime"].Value;
     object externalModifiedUserId = parameters["modifiedUserId"].Value;
     object newsFreeTime = parameters["newsFreeTime"].Value;
     object externalOrderTypeCode = parameters["orderTypeCode"].Value;
     object orderedQuantity = parameters["orderedQuantity"].Value;
     object externalPriceTypeCode = parameters["priceTypeCode"].Value;
     object receivedTime = parameters["receivedTime"].Value;
     object externalSecurityId = parameters["securityId"].Value;
     object externalSettlementId = parameters["settlementId"].Value;
     string externalSourceOrderId = ((string)(parameters["sourceOrderId"]));
     object startTime = parameters["startTime"].Value;
     object externalStatusCode = parameters["statusCode"].Value;
     object stopPrice = parameters["stopPrice"].Value;
     object stopTime = parameters["stopTime"].Value;
     object submittedQuantity = parameters["submittedQuantity"].Value;
     object submittedTime = parameters["submittedTime"].Value;
     object targetPrice = parameters["targetPrice"].Value;
     object externalTimeInForceCode = parameters["timeInForceCode"].Value;
     object externalWorkingOrderId = parameters["workingOrderId"].Value;
     // The row versioning is largely disabled for external operations.
     long rowVersion = long.MinValue;
     // Resolve External Identifiers
     object createdUserId = User.FindOptionalKey(configurationId, "createdUserId", externalCreatedUserId);
     object destinationId = Destination.FindOptionalKey(configurationId, "destinationId", externalDestinationId);
     object modifiedUserId = User.FindOptionalKey(configurationId, "modifiedUserId", externalModifiedUserId);
     object orderTypeCode = OrderType.FindOptionalKey(configurationId, "orderTypeCode", externalOrderTypeCode);
     object priceTypeCode = PriceType.FindOptionalKey(configurationId, "priceTypeCode", externalPriceTypeCode);
     object securityId = Security.FindOptionalKey(configurationId, "securityId", externalSecurityId);
     object settlementId = Security.FindOptionalKey(configurationId, "settlementId", externalSettlementId);
     int sourceOrderId = SourceOrder.FindRequiredKey(configurationId, "sourceOrderId", externalSourceOrderId);
     object statusCode = Status.FindOptionalKey(configurationId, "statusCode", externalStatusCode);
     object timeInForceCode = TimeInForce.FindOptionalKey(configurationId, "timeInForceCode", externalTimeInForceCode);
     object workingOrderId = WorkingOrder.FindOptionalKey(configurationId, "workingOrderId", externalWorkingOrderId);
     // While the optimistic concurrency checking is disabled for the external methods, the internal methods
     // still need to perform the check.  This ncurrency checking logic by finding the current row version to be
     // will bypass the coused when the internal method is called.
     ServerMarketData.SourceOrderRow sourceOrderRow = sourceOrderTable.FindBySourceOrderId(sourceOrderId);
     rowVersion = ((long)(sourceOrderRow[sourceOrderTable.RowVersionColumn]));
     // Call the internal method to complete the operation.
     MarkThree.Guardian.Core.SourceOrder.Update(adoTransaction, sqlTransaction, ref rowVersion, createdTime, createdUserId, destinationId, null, isAdvertised, isAutoExecute, isCanceled, isHeld, isSteppedIn, isSubmitted, limitPrice, maximumVolatility, modifiedTime, modifiedUserId, newsFreeTime, orderTypeCode, orderedQuantity, priceTypeCode, receivedTime, securityId, settlementId, sourceOrderId, startTime, statusCode, stopPrice, stopTime, submittedQuantity, submittedTime, targetPrice, timeInForceCode, workingOrderId);
     // Return values.
     parameters["rowVersion"] = rowVersion;
 }