Ejemplo n.º 1
0
        }//End of ClearShippedDate(.)

        public bool UpdateUserId(ShippingOrder order, int employeeID)
        {
            //If the UserId of the current ShippingOrder is the same value as the new value do not call the update procedure.
            {
                //Need to do error checking... Try/Catch.
                return(ShippingOrderDAL.AssignShippingOrder(order, employeeID, _connection));
            }
        }//End of UpdateUserId..)
Ejemplo n.º 2
0
        }//End of UpdatePickedTrue(.)

        //When would this be done?
        public bool UpdatePickedFalse(ShippingOrder order)
        {
            foreach (ShippingOrderLineItem item in order.ShippingOrderLineItemList)
            {
                prodMan.AddToAvailable(item.Quantity, item.ProductId);
            }
            //Need to do error checking... Try/Catch.
            return(ShippingOrderDAL.UnpickShippingOrder(order, _connection));
        }//End of UpdatePickedFalse(.)
Ejemplo n.º 3
0
        }//End of UpdateShippedDate(.)

        //When would this be done?
        public bool ClearShippedDate(ShippingOrder order)
        {
            //Need to do error checking... Try/Catch.

            foreach (ShippingOrderLineItem item in order.ShippingOrderLineItemList)
            {
                prodMan.AddToOnHand(item.Quantity, item.ProductId);
            }
            return(ShippingOrderDAL.UnshipShippingOrder(order, _connection));
        }//End of ClearShippedDate(.)
Ejemplo n.º 4
0
        }//End of UpdatePickedFalse(.)

        public bool UpdateShippedDate(ShippingOrder order)
        {
            //Need to do error checking... Try/Catch.

            foreach (ShippingOrderLineItem item in order.ShippingOrderLineItemList)
            {
                prodMan.RemoveFromOnHand(item.Quantity, item.ProductId);
            }
            return(ShippingOrderDAL.ShipShippingOrder(order, _connection));
            //Need to update on-hand inventory for all line items once the shipped date is set.
        }//End of UpdateShippedDate(.)
Ejemplo n.º 5
0
        }//End of Update(..)

        public bool UpdatePickedTrue(ShippingOrder order)
        {
            //Need to do error checking... Try/Catch.

            foreach (ShippingOrderLineItem item in order.ShippingOrderLineItemList)
            {
                prodMan.RemoveFromAvailable(item.Quantity, item.ProductId);
            }
            return(ShippingOrderDAL.PickShippingOrder(order, _connection));
            //Should also clear the current UserId.

            //Can also call ShippingOrderDAL.UnpickShippingOrder... When would this be done?
            //If necessary add logic to determine which method is called.
        }//End of UpdatePickedTrue(.)
Ejemplo n.º 6
0
        }//End of Insert(.)

        public bool Update(ShippingOrder order, ShippingOrder originalOrder)
        {
            //Need to do error checking... Try/Catch.
            return(ShippingOrderDAL.UpdateShippingOrder(order, originalOrder, _connection));
        }//End of Update(..)
Ejemplo n.º 7
0
        }//End of Orders sets/gets.

        public bool Insert(ShippingOrder order)
        {
            //Need to do error checking... Try/Catch.
            return(ShippingOrderDAL.AddShippingOrder(order, _connection));
        }//End of Insert(.)
Ejemplo n.º 8
0
        }//End of GetOrderByUserID(.)

        //Are these additional methods needed?

        public List <ShippingOrder> GetAllShippingOrders()
        {
            this.Orders = ShippingOrderDAL.GetAllShippingOrders(_connection);
            return(Orders);
        }
Ejemplo n.º 9
0
        }//End of GetOrdersByUserId(.)

        public ShippingOrder GetOrderByID(int orderID)
        {
            //Need to do error checking... Try/Catch.
            this.Order = ShippingOrderDAL.GetShippingOrderById(orderID, _connection);
            return(Order);
        }//End of GetOrderByUserID(.)
Ejemplo n.º 10
0
        }//End of GetPickedOrders()

        //Gets orders used for the employee work queue.
        public List <ShippingOrder> GetOrdersByUserId(int employeeID)
        {
            //Need to do error checking... Try/Catch.
            this.Orders = ShippingOrderDAL.GetAllShippingOrdersByEmployee(employeeID, _connection);
            return(Orders);
        }//End of GetOrdersByUserId(.)
Ejemplo n.º 11
0
        }//End of GetNonPickedOrders()

        //Gets orders used for the packing work queue.
        public List <ShippingOrder> GetPickedOrders()
        {
            //Need to do error checking... Try/Catch.
            this.Orders = ShippingOrderDAL.GetAllShippingOrdersPicked(_connection);
            return(Orders);
        }//End of GetPickedOrders()
Ejemplo n.º 12
0
        }//End of UpdateUserId..)

        public bool ClearUserId(ShippingOrder order)
        {
            //Need to do error checking... Try/Catch.
            return(ShippingOrderDAL.UnassignShippingOrder(order, _connection));
        }//End of ClearUserId(.)