Public Structure OrderInfo Public ProductID As Long Public Quantity As Integer Public CustomerId As Long Public ShipVia As ShipType
End Structure Public Enum ShipType FedEx UPS Postal
End Enum Public Class OrderProcessing Public Shared Function PlaceOrder(ByVal order As OrderInfo) As Long ' Start a transaction ' Check Inventory ' Retrieve customer information, check credit status ' Calculate price and tax ' Calculate shipping and total order ' Save Order to the database and commit transaction ' Send an email confirming the order ' Return the new order ID End Function
End Class |