Beispiel #1
0
        //Deprtment
        private void DepartmentData()
        {
            try
            {
                EclipsePOS.WPF.SystemManager.Data.DepartmentDataSet deptDatasetXml = new DepartmentDataSet();
                deptDatasetXml.ReadXml(View.InputFolderPath() + "\\Department.xml", XmlReadMode.ReadSchema);

                EclipsePOS.WPF.SystemManager.Data.DepartmentDataSet deptDatasetRDB = new DepartmentDataSet();
                EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter deptTableAdapter = new EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter();

                deptTableAdapter.Fill(deptDatasetRDB.department);
                deptDatasetRDB.Merge(deptDatasetXml);
                deptTableAdapter.Update(deptDatasetRDB);
            }
            catch (Exception e)
            {
                //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
                return;
            }
        }
Beispiel #2
0
        //Department

        private void DepartmentData()
        {
            try
            {
                EclipsePOS.WPF.SystemManager.Data.DepartmentDataSet deptDataset = new DepartmentDataSet();
                EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter deptTableAdapter = new EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter();
                deptTableAdapter.Fill(deptDataset.department);
                deptDataset.WriteXml(View.OutputFolderPath() + "\\Department.xml", XmlWriteMode.WriteSchema);
            }
            catch (Exception e)
            {
                //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
            }
        }
Beispiel #3
0
        public void OnShowItems()
        {
            //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);

            //Department
            departmentData = new EclipsePOS.WPF.SystemManager.Data.DepartmentDataSet();
            EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter departmentTa = new EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter();
            departmentTa.Fill(departmentData.department);
            View.SetDepartmentDataContext(departmentData.department);

            //Item Group
            itemGroupData = new EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSet();
            EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSetTableAdapters.ItemGroupTableAdapter itemGroupTa = new EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSetTableAdapters.ItemGroupTableAdapter();
            itemGroupTa.Fill(itemGroupData.ItemGroup);
            View.SetItemGroupDataContext(itemGroupData.ItemGroup);

            //Tax Groups
            taxGroupData = new EclipsePOS.WPF.SystemManager.Data.taxGroupDataSet();
            EclipsePOS.WPF.SystemManager.Data.taxGroupDataSetTableAdapters.tax_groupTableAdapter taxGroupTa = new EclipsePOS.WPF.SystemManager.Data.taxGroupDataSetTableAdapters.tax_groupTableAdapter();
            taxGroupTa.Fill(taxGroupData.tax_group);
            View.SetTaxGroupDataContext(taxGroupData.tax_group);



            //Item
            itemData = new EclipsePOS.WPF.SystemManager.Data.ItemsDataSet();
            EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter taItem = new EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter();
            taItem.Fill(itemData.item);
            View.SetItemsDataContext(itemData.item);

            _colView = CollectionViewSource.GetDefaultView(itemData.item) as CollectionView;
            taManager.itemTableAdapter = taItem;


            View.SetMoveToFirstBtnDataContext(MoveToFirstCommand);
            View.SetMoveToPreviousBtnDataContext(MoveToPreviousCommand);
            View.SetMoveToNextBtnDataContext(MoveToNextCommand);
            View.SetMoveToLastBtnDataContext(MoveToLastCommand);

            View.SetDeleteBtnDataContext(DeleteCommand);
            View.SetAddBtnDataContext(AddCommand);
            View.SetRevertBtnDataContext(RevertCommand);
            View.SetSaveBtnDataContext(SaveCommand);

            // View.SetFilterBtnDataContext(FilterCommand);

            _colView.CurrentChanged += new EventHandler(_colView_CurrentChanged);
        }
        public void OnShowDepartment()
        {
            //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);


            //Department
            deptData = new  EclipsePOS.WPF.SystemManager.Data.DepartmentDataSet();
            EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter deptTa = new EclipsePOS.WPF.SystemManager.Data.DepartmentDataSetTableAdapters.departmentTableAdapter();
            deptTa.Fill(deptData.department);
            View.SetDeptDataContext(deptData.department);

            _colView = CollectionViewSource.GetDefaultView(deptData.department) as CollectionView;
            taManager.departmentTableAdapter = deptTa;
            //taManager..Connection = new con


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