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 tuncerRank #1,499 · 1.1K reputationPosted May 12, 2016, 8:45 PM EDT
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)
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted May 13, 2016, 2:16 AM EDT
mike23 reputationPosted May 15, 2016, 9:05 PM EDT
ali tuncerRank #1,499 · 1.1K reputationPosted May 16, 2016, 9:03 PM EDT
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..