//Station Data private void StationData() { try { EclipsePOS.WPF.SystemManager.Data.stationDataSet stationDataSet = new stationDataSet(); EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter stationTableAdapter = new EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter(); stationTableAdapter.Fill(stationDataSet.pos); stationDataSet.WriteXml(View.OutputFolderPath() + "\\Station.xml", XmlWriteMode.WriteSchema); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); } }
//Station private void StationData() { try { EclipsePOS.WPF.SystemManager.Data.stationDataSet dataSetXml = new stationDataSet(); dataSetXml.ReadXml(View.InputFolderPath() + "\\Station.xml", XmlReadMode.ReadSchema); EclipsePOS.WPF.SystemManager.Data.stationDataSet dataSetRDB = new stationDataSet(); EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter tableAdapter = new EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter(); tableAdapter.Fill(dataSetRDB.pos); dataSetRDB.Merge(dataSetXml); tableAdapter.Update(dataSetRDB); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); return; } }