public EntityOrder GetByOrderID(string OrderID)
        {
            var data = base.DataContext.Orders.Where(p => p.OrderID == OrderID);

            if (data.Count() == 1)
            {
                return(FactoryOrder.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }
        public EntityOrder GetByOrderID(string OrderID, DateTime OrderExecuteDate)
        {
            var data = base.DataContext.Orders.Where(p => p.OrderID == OrderID && DbFunctions.TruncateTime(p.OrderExecuteDate) == OrderExecuteDate);

            if (data.Count() == 1)
            {
                return(FactoryOrder.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }
        public EntityOrder Get(int Id)
        {
            var data = base.DataContext.Orders.Where(p => p.PK_OrderID == Id);

            if (data.Count() == 1)
            {
                return(FactoryOrder.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }