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; }
//Store Data private void StoreData() { try { EclipsePOS.WPF.SystemManager.Data.storeDataSet storeDataSet = new storeDataSet(); EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter storeTableAdapter = new EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter(); storeTableAdapter.Fill(storeDataSet.retail_store); storeDataSet.WriteXml(View.OutputFolderPath() + "\\Store.xml", XmlWriteMode.WriteSchema); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); } }
public void OnShowPaymentDetailsByDate() { storeData = new storeDataSet(); EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter storeTa = new EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter(); storeTa.Fill(storeData.retail_store); View.SetRetailStoreFromDataContext(storeData.retail_store); View.SetRetailStoreToDataContext(storeData.retail_store); 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.SetOrganizationFromDataContext(organizationData.organization); View.SetOrganizationToDataContext(organizationData.organization); View.SetRunBtnDataContext(RunCommand); }
//Store private void StoreData() { try { EclipsePOS.WPF.SystemManager.Data.storeDataSet dataSetXml = new storeDataSet(); dataSetXml.ReadXml(View.InputFolderPath() + "\\Store.xml", XmlReadMode.ReadSchema); EclipsePOS.WPF.SystemManager.Data.storeDataSet dataSetRDB = new storeDataSet(); EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter tableAdapter = new EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter(); tableAdapter.Fill(dataSetRDB.retail_store); dataSetRDB.Merge(dataSetXml); tableAdapter.Update(dataSetRDB); } catch (Exception e) { //Microsoft.Windows.Controls.MessageBox.Show(e.ToString()); return; } }
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); }
public void OnShowSalesPersonView() { storeData = new storeDataSet(); EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter storeTa = new EclipsePOS.WPF.SystemManager.Data.storeDataSetTableAdapters.retail_storeTableAdapter(); storeTa.Fill(storeData.retail_store); View.SetRetailStoreFromDataContext(storeData.retail_store); View.SetRetailStoreToDataContext(storeData.retail_store); 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.SetOrganizationFromDataContext(organizationData.organization); View.SetOrganizationToDataContext(organizationData.organization); emplyeeData = new employeeDataSet(); EclipsePOS.WPF.SystemManager.Data.employeeDataSetTableAdapters.employeeTableAdapter employeeTa = new EclipsePOS.WPF.SystemManager.Data.employeeDataSetTableAdapters.employeeTableAdapter(); employeeTa.Fill(emplyeeData.employee); View.SetEmployeeFromDataContext(emplyeeData.employee); View.SetEmployeeToDataContext(emplyeeData.employee); View.SetRunBtnDataContext(RunCommand); View.SetSaveBtnDataContext(SaveCommand); }