Exemplo n.º 1
0
        internal static MappedOrderRelation From(DataRow row)
        {
            MappedOrderRelation relation = new MappedOrderRelation();

            relation.CloseOrderID = (Guid)row["MappedOrderID"];
            relation.OpenOrderID  = (Guid)row["OpenOrderID"];
            relation.ClosedLot    = (decimal)row["ClosedLot"];

            return(relation);
        }
Exemplo n.º 2
0
        private void ProcessMappedOrders(DataSet dataSet)
        {
            if (dataSet.Tables[0].Rows.Count > 0)
            {
                Dictionary <Guid, MappedOrder> orders = new Dictionary <Guid, MappedOrder>();
                foreach (DataRow dataRow in dataSet.Tables[0].Rows)
                {
                    MappedOrder order = MappedOrder.From(dataRow);
                    this.waitingForBookOrders.Add(order);
                    orders.Add(order.ID, order);
                }

                foreach (DataRow dataRow in dataSet.Tables[1].Rows)
                {
                    MappedOrderRelation relation = MappedOrderRelation.From(dataRow);
                    orders[relation.CloseOrderID].AddRelation(relation);
                }

                this.waitingForBookOrders.Sort(MappedOrderComparer.Default);
            }
        }
Exemplo n.º 3
0
 internal void AddRelation(MappedOrderRelation relation)
 {
     this.relations.Add(relation);
 }