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.
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
Post a Comment