}//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..)
}//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(.)
}//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(.)
}//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(.)
}//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(.)
}//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(..)
}//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(.)
}//End of GetOrderByUserID(.) //Are these additional methods needed? public List <ShippingOrder> GetAllShippingOrders() { this.Orders = ShippingOrderDAL.GetAllShippingOrders(_connection); return(Orders); }
}//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(.)
}//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(.)
}//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()
}//End of UpdateUserId..) public bool ClearUserId(ShippingOrder order) { //Need to do error checking... Try/Catch. return(ShippingOrderDAL.UnassignShippingOrder(order, _connection)); }//End of ClearUserId(.)