示例#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..)
示例#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(.)
示例#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(.)
示例#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(.)
示例#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(.)
示例#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(..)
示例#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(.)
示例#8
0
        }//End of GetOrderByUserID(.)

        //Are these additional methods needed?

        public List <ShippingOrder> GetAllShippingOrders()
        {
            this.Orders = ShippingOrderDAL.GetAllShippingOrders(_connection);
            return(Orders);
        }
示例#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(.)
示例#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(.)
示例#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()
示例#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(.)