Hi
I’ve two comboboxes which contains two different informations and a datagridview (dgv) to display the records
1. cbTable: select table_name from information_schema.tables (multiple tables)
2. cbAttribute: manually enterd some column names from the selected cbTable
If cbTable is selected, the records should be displayed in dgv and
If cbAttribute is selected, it should link up with the selected cbTable and the display the records associated with it.
Example:
cbTable [tbl1, tbl2, tbl2 …]
ProjectNr Location FKZ ABamount1 ABamount2 CFamount …..
A.1234 South Li 4000 1000 4080 ….
A.4567 North La 5000 2200 1500 ….
B.5678 Southeast Li 8000 3000 3100 ….
C.9012 Central Lu 6000 5000 250 ….
D.5672 East La 2500 1000 8000 ….
cbAtrribute [ProjektNr, Location, FKZ]. Ps: the column name are exact the same for all the table only the amounts differs.
So if I select tbl2 from cbTAble and ProjectNr, I expert something like this:
ProjectNr ABamount1 ABamount2 CFamount ABamount_Delta
A.1234 4000 1000 4080 3000
A.4567 5000 2200 1500 2800
B.5678 8000 3000 3100 5000
…. …. …. …. ….
OR if tbl2 and FKZ are selected:
FKZ ABamount1 ABamount2 CFamount ABamount_Delta
Li 12000 4000 4080 8000
La 7500 3200 1500 4300
Lu 6000 5000 200 5000
…. …. …. …. ….
Can you experts please help me out with suggestions or the c# code (winforms)?