Hiblet/NewZopa01 — pull request #35 by Hiblet (2014-04-02 12:19:34+00:00)
Title: Fixed EffectiveFrom orders not deleting (comparator bug); Web page can now control Algo in running;  MarketDefn changes tracked;

ADDED: MarketDefnHistoryDAL.cs
-- Class file to interface new table.

CHANGED: MarketDefn.cs
-- Now records state, and sequence number to track changes.
-- Updated database loading Ctor.
-- Accessors now advance the sequence number when changes occur.
-- State variable has sqlize function.
-- Added lookupAlgoFromInt() for web control.

CHANGED: MarketDefnDAL.cs
-- Functions renamed to comply to convention.
-- FIXED: Bug where price protocol missing from Update statement.
-- Added: UpdateSeqNum() to track only seqnum changes on state change.
-- Refactored: Comply with Market.cs Database loading Ctor change.

CHANGED: Market.cs
-- Halt promoted to be a valid state.
-- Market state change functions now update the MarketDefn and MarketDefnHistory
tables to record changes.
-- Add(); Changes are now made to orders before they are entered into
containers.
-- actionCancel() and actionReplace() drop orders before amending them.

CHANGED: MarketManager.cs
-- Added Get/SetMarketAlgo() functions for web control.
-- Added Halt state check during order entry.
-- Added logging during triggering of EffectiveFrom orders (diags).
-- Commented out testMarketDefnDAL() fn as this used old ctor.

CHANGED: Order.cs
-- Added Dump() to output whole order to string.
-- Changed ToString() to yield a string that is "ClOrdID-User", immutable.
-- FIXED: Bug in comparator functions; They were never returning zero for
equality. Zero return is required to signal a match when searching
containers. Therefore zero is returned for genuine equality.

CHANGED: OrderContainers.cs
-- Additional logging.

CHANGED: MarketControl.js
-- Implemented Algo change function.
-- scrapeSymbol() moved to common location.

CHANGED: Orders.js
-- EffectiveFrom time now uses zero's as second and millisecond defaults.

CHANGED: MarketControl.aspx; MarketControl.aspx
-- Added Algo control and wrapper web methods.

CHANGED: TableCreateScript.sql (2 of)
-- Added MarketDefnHistory table.

CHANGED: web.config
-- Comments regarding matching throttle