Question Update dataGridView Quantity

EDM83

New member
Joined
Nov 13, 2020
Messages
1
Programming Experience
Beginner
Hello All,

I'm after some help regarding the following:

Table1 BagKit
Contains
Bag1
Bag2
Bag3

Table2 BagKitStock
Contains
Bag1 Apple 3
Bag1 Flashlight 1
Bag1 Water bottles 2
Bag1 Plaster3

Table3 StockTotal
Contains
Apple 100
Flashlight 60
Water bottles 30
Plasters 25

I have a program that has a combox which is populated via the BagKit table. The selected bag from the combox displays in a datagrid with the contents and quantity that make up the bag displayed below.

Bag1 Apple 3
Bag1 Flashlight 1
Bag1 Water bottles 2
Bag1 Plasters 3

The app also has a quantity box which represents the total amount of 'Bag1' that have been used, this will then update the total stock used for the individual items. The idea is that when I put an amount lets say 10 in the quantity box, it will multiple the amount of Apple, Flashlight, Water bottles, Plasters and remove these totals from the StockTotal table so that stock quantities are kept updated.

What I dont know is how query the data to move through the datagrid so it changes the value to be as below:

Bag1 Apple 30
Bag1 Flashlight 10
Bag1 Water bottles 20
Bag1 Plasters 30

Hope that makes sense, appreciate any help.
 
Back
Top Bottom