sql server - Show multiple databases table in one same DataGridView in c# windows form application -


i need program, application many things. having issue datagridview works if use 1 database source, program needs show 3 different databases depending of listbox user selection.

so example if user select location1 show location1 database table if user chooses location2 show location2 database table if user chooses location3 show database table location3

now same table difference databases different data because of difference warehouses.

so how can accomplished this??

here image shows user selection listbox value , datagridview show depending of user selection of database lemars21st means location1 test. if need more information please let me know. enter image description here

here part of code form1 display application runs

private void form1_load(object sender, eventargs e)         {             if (cmb_databaseselection.selecteditem == "location3")             {                 // todo: line of code loads data '_footprint_dldataset.allinvoicesinreadystatus' table. can move, or remove it, needed.                 this.allinvoicesinreadystatustableadapter2.fill(this._footprint_dldataset.allinvoicesinreadystatus);             }              if (cmb_databaseselection.selecteditem == "location2")             {                 // todo: line of code loads data '_footprint_sldataset.allinvoicesinreadystatus' table. can move, or remove it, needed.                 this.allinvoicesinreadystatustableadapter1.fill(this._footprint_sldataset.allinvoicesinreadystatus);             }              if (cmb_databaseselection.selecteditem == "location3")             {                 // todo: line of code loads data '_footprint_lemarsdataset.allinvoicesinreadystatus' table. can move, or remove it, needed.                 this.allinvoicesinreadystatustableadapter.fill(this._footprint_lemarsdataset.allinvoicesinreadystatus);             }  } 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -