Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
 //Item Data
 private void ItemData()
 {
     try
     {
         EclipsePOS.WPF.SystemManager.Data.ItemsDataSet itemDataSet = new  ItemsDataSet();
         EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter itemTableAdapter = new  EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter();
         itemTableAdapter.Fill(itemDataSet.item);
         itemDataSet.WriteXml(View.OutputFolderPath() + "\\Item.xml", XmlWriteMode.WriteSchema);
     }
     catch (Exception e)
     {
         //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
     }
 }
Exemplo n.º 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);



            //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;


            //Trans Stock
            stockData = new EclipsePOS.WPF.SystemManager.Data.transStockDataSet();
            EclipsePOS.WPF.SystemManager.Data.transStockDataSetTableAdapters.trans_stockTableAdapter taTransStock = new EclipsePOS.WPF.SystemManager.Data.transStockDataSetTableAdapters.trans_stockTableAdapter();

            taManagerTransStock.trans_stockTableAdapter = taTransStock;

            //Stock Balance
            stockBalanceData = new EclipsePOS.WPF.SystemManager.Data.updateStockBalanceDataSet();


            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);
        }
Exemplo n.º 4
0
        //Item
        private void ItemData()
        {
            try
            {
                EclipsePOS.WPF.SystemManager.Data.ItemsDataSet itemDataSetXml = new  ItemsDataSet();
                itemDataSetXml.ReadXml(View.InputFolderPath() + "\\Item.xml", XmlReadMode.ReadSchema);

                EclipsePOS.WPF.SystemManager.Data.ItemsDataSet itemDataSetRDB = new  ItemsDataSet();
                EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter itemTableAdapter = new  EclipsePOS.WPF.SystemManager.Data.ItemsDataSetTableAdapters.itemTableAdapter();
                itemTableAdapter.Fill(itemDataSetRDB.item);

                itemDataSetRDB.Merge(itemDataSetXml);
                itemTableAdapter.Update(itemDataSetRDB);
            }
            catch (Exception e)
            {
                //Microsoft.Windows.Controls.MessageBox.Show(e.ToString());
                return;
            }
        }
Exemplo n.º 5
0
        public void OnShowItemLabels()
        {
            //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
            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;

            //Commands
            View.SetRunBtnDataContext(RunCommand);
            View.SetFilterBtnDataContext(FilterCommand);
            View.SetSelectBtnDataContext(SelectCommand);
            View.SetSelectAllBtnDataContext(SelectAllCommand);
        }
Exemplo n.º 6
0
        public void OnShowPromoMapView()
        {
            //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);
            _itemColView = CollectionViewSource.GetDefaultView(itemData.item) as CollectionView;
            this.FilterItemByOrganizationNo(View.Organization);

            //PromotionsMap
            promotionMapData = new EclipsePOS.WPF.SystemManager.Data.promotionMapDataSet();
            EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter promotionMapTa = new EclipsePOS.WPF.SystemManager.Data.promotionMapDataSetTableAdapters.promotion_mapTableAdapter();
            promotionMapTa.Fill(promotionMapData.promotion_map);
            View.SetPromoMapDataContext(promotionMapData.promotion_map);

            _promotionMapColView = CollectionViewSource.GetDefaultView(promotionMapData.promotion_map) as CollectionView;
            taManager.promotion_mapTableAdapter = promotionMapTa;
            this.FilterPromotionMapByOrganizationNo(View.Organization);



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

            View.SetDeleteBtnDataContext(DeleteCommand);
            View.SetSelectBtnDataContext(AddCommand);
            View.SetRevertBtnDataContext(RevertCommand);
            View.SetSaveBtnDataContext(SaveCommand);
            View.SetSelectAllBtnDataContext(SelectAllCommand);

            // View.SetFilterBtnDataContext(FilterCommand);

            View.SetCancelBtnDataContext(CancelCommand);
        }