Пример #1
0
        public void  OnShowSettings()
        {
            //Organization
            organizationData = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSet();
            EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter organizationTa = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter();
            organizationTa.Fill(organizationData.organization);
            View.SetOrganizationDataContext(organizationData.organization);

            //Store
            storeData = new EclipsePOS.WPF.SystemManager.Data.storeDataSet();
            EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter storeTa = new EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter();
            storeTa.Fill(storeData.retail_store);
            View.SetStoreDataContext(storeData.retail_store);

            //Station
            stationData = new EclipsePOS.WPF.SystemManager.Data.stationDataSet();
            EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter posTa = new EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter();
            posTa.Fill(stationData.pos);
            View.SetStationDataContext(stationData.pos);

            //PosConfig
            posConfigData = new EclipsePOS.WPF.SystemManager.Data.posConfigDataSet();
            EclipsePOS.WPF.SystemManager.Data.posConfigDataSetTableAdapters.pos_configTableAdapter posConfigTa = new EclipsePOS.WPF.SystemManager.Data.posConfigDataSetTableAdapters.pos_configTableAdapter();
            posConfigTa.Fill(posConfigData.pos_config);
            View.SetPosConfigDataContext(posConfigData.pos_config);

            View.SetSaveBtnDataContext(SaveCommand);

            FilterAll(PosSettings.Default.Organization, PosSettings.Default.Store);

            View.Organization = PosSettings.Default.Organization;
            View.Store        = PosSettings.Default.Store;
            View.Station      = PosSettings.Default.Station;
        }
Пример #2
0
 //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());
     }
 }
Пример #3
0
        //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;
            }
        }
Пример #4
0
        public void OnShowStation()
        {
            //Organization
            organizationData = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSet();
            EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter organizationTa = new EclipsePOS.WPF.SystemManager.Data.organizationLookupDataSetTableAdapters.organizationTableAdapter();
            organizationTa.Fill(organizationData.organization);
            View.SetOrganizationDataContext(organizationData.organization);

            //Store data
            storeData = new EclipsePOS.WPF.SystemManager.Data.storeDataSet();
            EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter storeTa = new EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter();
            storeTa.Fill(storeData.retail_store);
            View.SetStoreNoDataContext(storeData.retail_store);


            //Station data
            stationData = new EclipsePOS.WPF.SystemManager.Data.stationDataSet();
            EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter posTa = new EclipsePOS.WPF.SystemManager.Data.stationDataSetTableAdapters.posTableAdapter();
            posTa.Fill(stationData.pos);
            View.SetStationDataContext(stationData.pos);

            _colView = CollectionViewSource.GetDefaultView(stationData.pos) as CollectionView;
            taManager.posTableAdapter = posTa;



            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);
        }