//TableGroup private void TableGroupData() { try { EclipsePOS.WPF.SystemManager.Data.tableGroupDataSet dataSetXml = new tableGroupDataSet(); dataSetXml.ReadXml(View.InputFolderPath() + "\\TableGroup.xml", XmlReadMode.ReadSchema); EclipsePOS.WPF.SystemManager.Data.tableGroupDataSet dataSetRDB = new tableGroupDataSet(); EclipsePOS.WPF.SystemManager.Data.tableGroupDataSetTableAdapters.table_groupTableAdapter tableAdapter = new EclipsePOS.WPF.SystemManager.Data.tableGroupDataSetTableAdapters.table_groupTableAdapter(); tableAdapter.Fill(dataSetRDB.table_group); dataSetRDB.Merge(dataSetXml); tableAdapter.Update(dataSetRDB); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); return; } }
public void OnShowTableViewPresenter() { //Table Group tableGroupData = new EclipsePOS.WPF.SystemManager.Data.tableGroupDataSet(); EclipsePOS.WPF.SystemManager.Data.tableGroupDataSetTableAdapters.table_groupTableAdapter tableGroupTa = new EclipsePOS.WPF.SystemManager.Data.tableGroupDataSetTableAdapters.table_groupTableAdapter(); tableGroupTa.Fill(tableGroupData.table_group); View.SetTableGroupDataContext(tableGroupData.table_group); this.FilterTableGroup(); tableData = new EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSet(); EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSetTableAdapters.table_detailsTableAdapter tableTa = new EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSetTableAdapters.table_detailsTableAdapter(); tableTa.Fill(tableData.table_details); View.SetTableDataContext(tableData.table_details); //View.SetTableModel(tableData.table_details); _colView = CollectionViewSource.GetDefaultView(tableData.table_details) as CollectionView; taManager.table_detailsTableAdapter = tableTa; View.SetMoveToFirstBtnDataContext(MoveToFirstCommand); View.SetMoveToPreviousBtnDataContext(MoveToPreviousCommand); View.SetMoveToNextBtnDataContext(MoveToNextCommand); View.SetMoveToLastBtnDataContext(MoveToLastCommand); View.SetDeleteBtnDataContext(DeleteCommand); View.SetAddBtnDataContext(AddCommand); View.SetRevertBtnDataContext(RevertCommand); View.SetSaveBtnDataContext(SaveCommand); _colView.CurrentChanged += new EventHandler(_colView_CurrentChanged); if (_colView.IsEmpty || _colView.IsCurrentBeforeFirst || _colView.IsCurrentAfterLast) { View.SetColumnsEnabled(false); } else { View.SetColumnsEnabled(true); } }
//TableGroup Data private void TableGroupData() { try { EclipsePOS.WPF.SystemManager.Data.tableGroupDataSet tableGroupDataSet = new tableGroupDataSet(); EclipsePOS.WPF.SystemManager.Data.tableGroupDataSetTableAdapters.table_groupTableAdapter tableGroupTableAdapter = new EclipsePOS.WPF.SystemManager.Data.tableGroupDataSetTableAdapters.table_groupTableAdapter(); tableGroupTableAdapter.Fill(tableGroupDataSet.table_group); tableGroupDataSet.WriteXml(View.OutputFolderPath() + "\\TableGroup.xml", XmlWriteMode.WriteSchema); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); } }