예제 #1
0
파일: Booker.cs 프로젝트: dreamsql/Outter
        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);
        }
예제 #2
0
파일: Booker.cs 프로젝트: dreamsql/Outter
        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);
            }
        }
예제 #3
0
파일: Booker.cs 프로젝트: dreamsql/Outter
 internal void AddRelation(MappedOrderRelation relation)
 {
     this.relations.Add(relation);
 }