Our company mainly develops on remote computers. This project uses vs2019 to compile this code normally, and the combobox drop-down box has data. But if the compiled exe is copied to another computer to run, there will be no data in the combobox drop-down box. I checked this project in vs2019. Combobox1 does not have the ItemsSource attribute, but because the code is very old and not written by me, and I can get the drop-down box data of combobox1 when compiling in vs2019, so it is very strange. This doesn't have the attribute itemssource which actually works. But copy the compiled exe to another computer to run, the combobox drop-down box will not display data, and the itemssource will be invalid at this time. Of course, please ask the boss to say that this code was written in vs2013 before.
Due to company regulations, I can only provide these codes:
DataSet ds=new System.Data.DataSet();
ds.Merge(GlobalVariable.DBoper.GetDownLoadProcessRecords(20));
combobox1.ItemsSource=ds.Tables["GetName"].AsDataView();
What is the problem? Any suggestion is worth considering.