Hiblet/NewZopa01 — pull request #30 by Hiblet (2014-03-27 09:48:07+00:00)
Title: Validation rationalised; Cancels now working;

CHANGED: AccountManager.cs
-- Added shortcuts to return ACCOUNTINVALIDPKEY after sanity checks.

CHANGED: AppUtility.cs
-- Added maximum length parameter to ConvertEnumerableCollectionToString()

CHANGED: AsyncHttpHandlerOrders.cs
-- Added logging

CHANGED: Extensions.cs
-- Numeric regex corrected

CHANGED: Market.cs
-- Validation and limit breach checks removed (now in Order.Validate...())
-- place() now adds the order to the registry (this was missing).
-- Failure to place a ReplaceRequest results in exception.

CHANGED: MarketManager.cs
-- MarketManager will now use the embedded user ID of an order to send an
update, if the order has no valid account.
-- If no users can see an update report, a warning is thrown.

CHANGED: Order.cs
-- Build order string routine now sets Cancel prices to Market values and
sets the OrderType based on the OrdMessage tag.
-- Added checkOrderInternallyConsistent() to police prices.
-- setByTag() now private.
-- Added ValidateTradingAccount() and ValidateViewingAccount() to check
that accounts exist. Trading variant applies limit breach check.
-- ValidateQty() now checks order has openQty and is not completed.

CHANGED: OrderQInDAL.cs
-- Cancel orders loaded from queue now have prices set to Market values.

CHANGED: OrderSubscriptionManager.cs
-- Additional logging

CHANGED: PositionLimitManager.cs
-- BrokenRules string now does not exceed 220 chars.

CHANGED: Trading.aspx.cs
-- Order book sql select statement now uses accounts and user id to pull
in data, so that orders with missing accounts (Cancels) appear.

FIXED: OrderTestData.sql
-- Typo in enum for PositionLimit Insert, NOT-RESTRICTED -> NOT_RESTRICTED