예제 #1
0
        /* Method will get a fully populated order, based on a supplied Order Status type,
         * complete with a customer object and a list of inventory item objects*/
        public List <Order> GetOrdersByOrderStatus(BusinessLayer.Enumerations.OrderStatus orderStatus)
        {
            // Translate partially populated order list into a business object list
            List <Order> orders = Translators.Order.ToBusinessObject(_dataAccessObjects.GetByOrderStatusId((int)orderStatus));

            // Send partially populated order list to become fully populated with [customer & address], [inventory item & catalog item]
            List <Order> orderList = PopulateOrders(orders);

            return(orderList);
        }
        public static Enumeration.OrderStatus ConvertStringToOrderStatus(string status)
        {
            Enumeration.OrderStatus orderStatus = new Enumeration.OrderStatus();

            orderStatus = Enumeration.OrderStatus.None;

            if ((status.ToLower() == "failed validation") || (status.ToLower() == "failedvalidation"))
            {
                orderStatus = Enumeration.OrderStatus.FailedValidation;
            }

            else if (status.ToLower() == "submitted")
            {
                orderStatus = Enumeration.OrderStatus.Submitted;
            }

            else if ((status.ToLower() == "work complete") || (status.ToLower() == "workcomplete"))
            {
                orderStatus = Enumeration.OrderStatus.WorkComplete;
            }

            else if (status.ToLower() == "delivered")
            {
                orderStatus = Enumeration.OrderStatus.WorkComplete;
            }

            else if ((status.ToLower() == "en route") || (status.ToLower() == "enroute"))
            {
                orderStatus = Enumeration.OrderStatus.EnRoute;
            }

            else if (status.ToLower() == "complete")
            {
                orderStatus = Enumeration.OrderStatus.Complete;
            }

            return orderStatus;
        }
예제 #3
0
        public static Enumeration.OrderStatus ConvertStringToOrderStatus(string status)
        {
            Enumeration.OrderStatus orderStatus = new Enumeration.OrderStatus();

            orderStatus = Enumeration.OrderStatus.None;

            if ((status.ToLower() == "failed validation") || (status.ToLower() == "failedvalidation"))
            {
                orderStatus = Enumeration.OrderStatus.FailedValidation;
            }

            else if (status.ToLower() == "submitted")
            {
                orderStatus = Enumeration.OrderStatus.Submitted;
            }

            else if ((status.ToLower() == "work complete") || (status.ToLower() == "workcomplete"))
            {
                orderStatus = Enumeration.OrderStatus.WorkComplete;
            }

            else if (status.ToLower() == "delivered")
            {
                orderStatus = Enumeration.OrderStatus.WorkComplete;
            }

            else if ((status.ToLower() == "en route") || (status.ToLower() == "enroute"))
            {
                orderStatus = Enumeration.OrderStatus.EnRoute;
            }

            else if (status.ToLower() == "complete")
            {
                orderStatus = Enumeration.OrderStatus.Complete;
            }

            return(orderStatus);
        }
예제 #4
0
        public static List <Order> GetOrderByOrderStatus(Enumeration.OrderStatus orderStatus)
        {
            BusinessObjects _businessObjects = new BusinessObjects();

            return(_businessObjects.GetOrdersByOrderStatus(orderStatus));
        }