Exemplo n.º 1
0
 //Table Data
 private void TableDetailsData()
 {
     try
     {
         EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSet tableDetailsDataSet = new  tableDetailsDataSet();
         EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSetTableAdapters.table_detailsTableAdapter tableDetailsTableAdapter = new  EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSetTableAdapters.table_detailsTableAdapter();
         tableDetailsTableAdapter.Fill(tableDetailsDataSet.table_details);
         tableDetailsDataSet.WriteXml(View.OutputFolderPath() + "\\TableDetails.xml", XmlWriteMode.WriteSchema);
     }
     catch (Exception e)
     {
         //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
     }
 }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        //Table
        private void TableDetailsData()
        {
            try
            {
                EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSet dataSetXml = new  tableDetailsDataSet();
                dataSetXml.ReadXml(View.InputFolderPath() + "\\TableDetails.xml", XmlReadMode.ReadSchema);

                EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSet dataSetRDB = new  tableDetailsDataSet();
                EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSetTableAdapters.table_detailsTableAdapter tableAdapter = new  EclipsePOS.WPF.SystemManager.Data.tableDetailsDataSetTableAdapters.table_detailsTableAdapter();
                tableAdapter.Fill(dataSetRDB.table_details);

                dataSetRDB.Merge(dataSetXml);
                tableAdapter.Update(dataSetRDB);
            }
            catch (Exception e)
            {
                //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
                return;
            }
        }