I am looking for sample code written in C# that would illustrate the basic concepts of creating an order entry program. This could be for sales or purchase. The most important concepts would be establishing an header to detail relationship. The header would have customer/vendor information plus the document total dollar amount. In the detail section would be a datagrid containing the detail of what was ordered. The extended price column would be dependent upon the quantity ordered times the sell price and the document total amount would be dependent upon the extended price of the lines. The sample can use the Northwind database as a base. This code would be wrapped around a SQL database.