I have a program where I'm inserting multiple records at once with an order. Some thing like if a customer is ordering multiple items. I'm trying to group the items with 1 Id so I can display them with 1 Customer and multiple Items.
This is the code I'm using:
http://www.c-sharpcorner.com/UploadFile/8c19e8/dynamically-adding-and-deleting-rows-in-gridview-and-saving/
I'm collecting the data I get from this code and putting it into my database. I have another table with customers. I'm trying to give the customers and the group of items the same Id so I can display the customers name and the items together.
Thanks for any suggestions.
ali tuncerPosted May 17, 2016, 1:03 AM
On the second table (OrderDetail) you will have a column OrderID, it is a foreign key, so when you create an order, your tables will look like this, here there are 2 orders..
mikePosted May 16, 2016, 1:05 AM
Vincent Maverick DuranoPosted May 13, 2016, 6:16 AM
ali tuncerPosted May 13, 2016, 12:45 AM
You didn't give information about your database tables. How do you save records?
I would keep 2 tables for Sales, Order and OrderDetail, columns would basically be like this(I am keeping it simple, you might need more columns)