Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
In a datagridview I have following Coloumns:
1. Product Name
2. Rate
3. Qty
4. Amt
5. Prev Bal
6. Total Amt
7. Amt Paid
8. Bal Amt
I have linked Product table to my form. from that I am getting Product Name and rate in first two coloumn and third col user will enter qty in fourth col value will come by multiplying Rate * Qty. Fifth Col value will come from another table.Sixth Col Value will be Addition of Fourth and Fifth Col.in Seventh Col the user entry (Customer paid amt) and in eight col vale will be Subtraction of Sixth - Seventh Col i.e. (Total Amt - Amt Paid).

If there are suppose 10 products listed in first Col. and this is not necessary that customer will buy all 10 products. if customer buys 4 products then the products which customer buys that row entire information should be saved in database i.e. product name, rate, qty, amt, etc.

How Do I do it ?


Thanks in Advance !!!!
Posted
Updated 2-Jul-12 4:09am
v2
Comments
Simon_Whale 2-Jul-12 11:27am    
are you storing the data in a tableadapter or dataset?
Ank_ush 2-Jul-12 12:21pm    
Using Table Adapter

1 solution

You can place a check box in DataGridview while clicking on "Buy" button you can simply loop through the grid and if the check box is cheked then add the product details to a ProductInfo List. then pass this product info to the update method.
 
Share this answer
 
Comments
_Amy 2-Jul-12 11:27am    
Good answer. My +5.
Shemeer NS 2-Jul-12 13:56pm    
thank you....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900