- Messages
- 49
- Reaction score
- 0
- Points
- 26
First explain ko muna mga table ko sa mysql:
table: stock_inventory
fields: stock_id (primary key), inventory_id (FK from supplies table), date_received, date_expired, type, price, stock_received, stock_left, no_days
table: supplies
fields: inventory_id (primary key), supply_name, description
table: dispense_supply
fields: dd_id (primary key), batch_id (FK from stock_inventory as stock_id), inventory_id (FK from supplies), quantity, price, date)
First task:
Paano ko po i-display sa datagridview pagnag-search ako sa textbox ng supplies either stock id or name ng supply sa stock_inventory at supplies na tables, need ko idisplay ang stock_id, inventory_id, supply_name, description, stock_left. (mysql query po)
2nd task: mag-dispense ng supply
bali babawasan ko yung stock left ng na-search ko na supply, may textbox ako kung saan kukunin ang quantity ng i-dispense. so bale ma-uupdate ang stock_inventory na table, yung stock_left nya.... and at the same time mag-iinsert ako ng new record sa table na dispense_supply ng binawas ko na supply sa stock_inventory na table. (process at mysql query)
Sana po naintindihan nyo po at maraming salamat mga programming masters!
- - - Updated - - -
Anyone po?
table: stock_inventory
fields: stock_id (primary key), inventory_id (FK from supplies table), date_received, date_expired, type, price, stock_received, stock_left, no_days
table: supplies
fields: inventory_id (primary key), supply_name, description
table: dispense_supply
fields: dd_id (primary key), batch_id (FK from stock_inventory as stock_id), inventory_id (FK from supplies), quantity, price, date)
First task:
Paano ko po i-display sa datagridview pagnag-search ako sa textbox ng supplies either stock id or name ng supply sa stock_inventory at supplies na tables, need ko idisplay ang stock_id, inventory_id, supply_name, description, stock_left. (mysql query po)
2nd task: mag-dispense ng supply
bali babawasan ko yung stock left ng na-search ko na supply, may textbox ako kung saan kukunin ang quantity ng i-dispense. so bale ma-uupdate ang stock_inventory na table, yung stock_left nya.... and at the same time mag-iinsert ako ng new record sa table na dispense_supply ng binawas ko na supply sa stock_inventory na table. (process at mysql query)
Sana po naintindihan nyo po at maraming salamat mga programming masters!
- - - Updated - - -
Anyone po?