Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
It is a form for sales, from a textbox I enter the product code and then the product information in the listview is displayed with the code, product name, price, quantity, discount, subtotal and tax.

When I add the same product, it is added in another line but what I want to do is instead of adding another line with the same product what I want it to do is to increase the quantity automatically and not add it to another line unless it is a different product, I have been trying for a long time and it is not achieved, if you can help me I would be very grateful.

What I have tried:

I tried to solve it using this forum but I haven't been able to get it done:
How to avoid duplicate products in a VB.NET 2010 listview and increase the quantity[^]
Posted
Updated 5-Apr-17 8:26am
v2
Comments
[no name] 5-Apr-17 12:17pm    
"I tried to solve it using this forum", you tried what?
"but I haven't been able to get it done", why not?
Do you think reposting the same "question" over and over is going to help somehow?
Dave Kreskowiak 5-Apr-17 12:29pm    
So, in your Add code, did you first execute a query for the ProductCode to see if it already existed in the database? I doubt it.
Karthik_Mahalingam 5-Apr-17 12:37pm    
post the code

1 solution

 
Share this answer
 

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