예제 #1
0
        public void OnShowItemGroup()
        {
            //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);

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

            _colView = CollectionViewSource.GetDefaultView(groupData.ItemGroup) as CollectionView;
            taManager.ItemGroupTableAdapter = groupTa;


            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);
        }
예제 #2
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);
        }
예제 #3
0
        //Item_group
        private void ItemGroupData()
        {
            try
            {
                EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSet itemGroupDataSetXml = new ItemGroupDataSet();
                itemGroupDataSetXml.ReadXml(View.InputFolderPath() + "\\ItemGroup.xml", XmlReadMode.ReadSchema);

                EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSet itemGroupDataSetRDB = new ItemGroupDataSet();
                EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSetTableAdapters.ItemGroupTableAdapter itemGroupTableAdapter = new  EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSetTableAdapters.ItemGroupTableAdapter();
                itemGroupTableAdapter.Fill(itemGroupDataSetRDB.ItemGroup);

                itemGroupDataSetRDB.Merge(itemGroupDataSetXml);
                itemGroupTableAdapter.Update(itemGroupDataSetRDB);
            }
            catch (Exception e)
            {
                //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
                return;
            }
        }
예제 #4
0
        //ItemGroup

        private void ItemGroupData()
        {
            try
            {
                EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSet groupDataSet = new ItemGroupDataSet();
                EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSetTableAdapters.ItemGroupTableAdapter groupTableAdapter = new EclipsePOS.WPF.SystemManager.Data.ItemGroupDataSetTableAdapters.ItemGroupTableAdapter();
                groupTableAdapter.Fill(groupDataSet.ItemGroup);
                groupDataSet.WriteXml(View.OutputFolderPath() + "\\ItemGroup.xml", XmlWriteMode.WriteSchema);
            }
            catch (Exception e)
            {
                // Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
            }
        }