how are you going to model a Purchase Order Class and a Supplier Class associated to the Purchase Order Class?
Printable View
how are you going to model a Purchase Order Class and a Supplier Class associated to the Purchase Order Class?
I'm afraid that none of us can do ANYTHING with the information you've given.
hmmm bad... let say in your opinion how are you going to model a Purchase Order Class and a Supplier Class... hope this make sense :D I was thinking what will are the fields, property and methods to be included for each class.
Purchase Order:
1. Fields: OrderID, SupplierID, OrderDate, RequiredDate, ShippedDate
2. Methods: GetPurchaseOrderDetails, AddOrder, UpdateOrder, DeleteOrder
Supplier:
1. Fields: SupplierID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Phone, Fax
You can start with these things.
thanks quite interesting. do i need to add the following methods (addorder, updateorder and deleteorder) in the cllass instead of doing that directly to database?
Not really... it all depends on how you are going to design the class. If you are going to write stored procedure for these tasks then there should be some way to call it from your application. You can create separate procedure for every operation addorder, updateorder and deleteorder. If you don't want to go this way then you can create a common method (e.g ExecuteStoredProc) that will execute any procedure.Quote:
Originally Posted by jlbantang