Exemple #1
0
        public void OnShowCustomer()
        {
            //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);

            //Customer
            customerData = new EclipsePOS.WPF.SystemManager.Data.customerDataSet();
            EclipsePOS.WPF.SystemManager.Data.customerDataSetTableAdapters.customerTableAdapter customerTa = new EclipsePOS.WPF.SystemManager.Data.customerDataSetTableAdapters.customerTableAdapter();
            customerTa.Fill(customerData.customer);
            View.SetCustomerDataContext(customerData.customer);

            _colView = CollectionViewSource.GetDefaultView(customerData.customer) as CollectionView;
            taManager.customerTableAdapter = customerTa;


            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);
        }
Exemple #2
0
 //Customer Data
 private void CustomerData()
 {
     try
     {
         EclipsePOS.WPF.SystemManager.Data.customerDataSet customerDataSet = new  customerDataSet();
         EclipsePOS.WPF.SystemManager.Data.customerDataSetTableAdapters.customerTableAdapter customerTableAdapter = new  EclipsePOS.WPF.SystemManager.Data.customerDataSetTableAdapters.customerTableAdapter();
         customerTableAdapter.Fill(customerDataSet.customer);
         customerDataSet.WriteXml(View.OutputFolderPath() + "\\Customer.xml", XmlWriteMode.WriteSchema);
     }
     catch (Exception e)
     {
         //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
     }
 }
Exemple #3
0
        //Customer
        private void CustomerData()
        {
            try
            {
                EclipsePOS.WPF.SystemManager.Data.customerDataSet dataSetXml = new  customerDataSet();
                dataSetXml.ReadXml(View.InputFolderPath() + "\\Customer.xml", XmlReadMode.ReadSchema);

                EclipsePOS.WPF.SystemManager.Data.customerDataSet dataSetRDB = new  customerDataSet();
                EclipsePOS.WPF.SystemManager.Data.customerDataSetTableAdapters.customerTableAdapter tableAdapter = new  EclipsePOS.WPF.SystemManager.Data.customerDataSetTableAdapters.customerTableAdapter();
                tableAdapter.Fill(dataSetRDB.customer);

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