Ejemplo n.º 1
0
        private void btnLast_Click(object sender, RoutedEventArgs e)
        {
            BindingListCollectionView view1 = CollectionViewSource.GetDefaultView(transDataSet.Tables[0].DefaultView) as BindingListCollectionView;

            view1.MoveCurrentToLast();
            this.OpenOrdersListView.ScrollIntoView(this.OpenOrdersListView.Items.CurrentItem);
        }
Ejemplo n.º 2
0
        public void LogViewFunctions(int key)
        {
            switch (key)
            {
            case 1:     // RecallEj

                DataRowView     data    = this.logListView.SelectedItem as DataRowView;
                int             transNo = int.Parse(data["trans_no"].ToString());
                RecallEjFromLog recall  = new RecallEjFromLog();
                recall.PosNo = PosSettings.Default.Station;
                recall.TrxNo = transNo;
                recall.Engage(0);

                break;

            case 2:     // X - Report
                PosContext.Instance.PosKeyValue = 1;
                new TerminalReport().Engage(1);

                break;

            case 3:     //First

                BindingListCollectionView view3 = CollectionViewSource.GetDefaultView(transDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view3.MoveCurrentToFirst();
                this.logListView.ScrollIntoView(this.logListView.Items.CurrentItem);

                break;

            case 4:     //Previois

                BindingListCollectionView view4 = CollectionViewSource.GetDefaultView(transDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view4.MoveCurrentToPrevious();
                this.logListView.ScrollIntoView(this.logListView.Items.CurrentItem);

                break;

            case 5:     //Next

                BindingListCollectionView view5 = CollectionViewSource.GetDefaultView(transDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view5.MoveCurrentToNext();
                this.logListView.ScrollIntoView(this.logListView.Items.CurrentItem);
                break;

            case 6:     //Last

                BindingListCollectionView view6 = CollectionViewSource.GetDefaultView(transDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view6.MoveCurrentToLast();
                this.logListView.ScrollIntoView(this.logListView.Items.CurrentItem);
                break;
            }
        }
Ejemplo n.º 3
0
        public void LookupFunction(ItemLookupDeviceFunctions key)
        {
            switch (key)
            {
            case ItemLookupDeviceFunctions.MoveCurrentToNext:

                BindingListCollectionView view1 = CollectionViewSource.GetDefaultView(itemDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view1.MoveCurrentToNext();
                this.itemSerchListView.ScrollIntoView(this.itemSerchListView.Items.CurrentItem);

                break;

            case ItemLookupDeviceFunctions.MoveCurrentToFirst:

                BindingListCollectionView view2 = CollectionViewSource.GetDefaultView(itemDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view2.MoveCurrentToFirst();
                this.itemSerchListView.ScrollIntoView(this.itemSerchListView.Items.CurrentItem);

                break;

            case ItemLookupDeviceFunctions.MoveCurrentToLast:

                BindingListCollectionView view3 = CollectionViewSource.GetDefaultView(itemDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view3.MoveCurrentToLast();
                this.itemSerchListView.ScrollIntoView(this.itemSerchListView.Items.CurrentItem);
                break;

            case ItemLookupDeviceFunctions.Cancel:
                /* this.Clear();
                 * PosContext.Instance.CurrentPosDisplay.LoadMenu((int)POSMenu.ItemLookupSeletion);
                 *
                 * */break;

            case ItemLookupDeviceFunctions.Select:
                PosContext.Instance.InputLine = this.SelectedItem();
                new EnterKey().Engage(0);
                break;

            case ItemLookupDeviceFunctions.MoveCurrentToPrevious:

                BindingListCollectionView view4 = CollectionViewSource.GetDefaultView(itemDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view4.MoveCurrentToPrevious();
                this.itemSerchListView.ScrollIntoView(this.itemSerchListView.Items.CurrentItem);

                break;

            case ItemLookupDeviceFunctions.Find:
                // if (PosContext.Instance.InputLine.Trim().Length > 0)
                //  {
                this.LoadItemByDescription("%" + PosContext.Instance.InputLine + "%");
                PosContext.Instance.ClearInput();
                PosContext.Instance.Operprompt.Clear();
                // }
                break;

            case ItemLookupDeviceFunctions.Clear:
                PosContext.Instance.ClearInput();
                PosContext.Instance.Operprompt.Clear();
                break;

            case ItemLookupDeviceFunctions.ItemDetails:

                PosContext.Instance.KeysByControl.Clear();

                object view = _regionManager.Regions[Regions.LogRegion].GetView("ActiveView");
                if (view != null)
                {
                    _regionManager.Regions[Regions.LogRegion].Remove(view);
                }

                ItemView itemView = _container.Resolve <ItemView>();
                _regionManager.Regions[Regions.LogRegion].Add(itemView, "ActiveView");
                itemView.SetDataContext(itemDataSet.Tables[0].DefaultView);
                itemView.LoadControls();

                object viewBottom = _regionManager.Regions[Regions.NavigatorRegion].GetView("ActiveView");
                if (viewBottom != null)
                {
                    _regionManager.Regions[Regions.NavigatorRegion].Remove(viewBottom);
                }

                BottomMenuView bottomMenu = _container.Resolve <BottomMenuView>("996");
                _regionManager.Regions[Regions.NavigatorRegion].Add(bottomMenu, "ActiveView");
                bottomMenu.LoadControls();

                // BottomMenuView bottomMenu = _container.Resolve<BottomMenuView>();
                // bottomMenu.LoadControls();


                KeyPadView keyPad = _container.Resolve <KeyPadView>();
                keyPad.LoadControls();

                //InvoiceTotalView invTot = _container.Resolve<InvoiceTotalView>();
                //invTot.LoadControls();


                break;

            case ItemLookupDeviceFunctions.CancelFromItemDetails:

                PosContext.Instance.KeysByControl.Clear();

                object view9 = _regionManager.Regions[Regions.LogRegion].GetView("ActiveView");
                if (view9 != null)
                {
                    _regionManager.Regions[Regions.LogRegion].Remove(view9);
                }

                ItemSearchView itemSearchView = _container.Resolve <ItemSearchView>("ItemSearch");
                _regionManager.Regions[Regions.LogRegion].Add(itemSearchView, "ActiveView");
                itemSearchView.LoadControls();

                // BottomMenuView bottomMenu9 = _container.Resolve<BottomMenuView>();
                // bottomMenu9.LoadControls();
                object viewBottom9 = _regionManager.Regions[Regions.NavigatorRegion].GetView("ActiveView");
                if (viewBottom9 != null)
                {
                    _regionManager.Regions[Regions.NavigatorRegion].Remove(viewBottom9);
                }

                BottomMenuView bottomMenu1 = _container.Resolve <BottomMenuView>("995");
                _regionManager.Regions[Regions.NavigatorRegion].Add(bottomMenu1, "ActiveView");
                bottomMenu1.LoadControls();

                KeyPadView keyPad9 = _container.Resolve <KeyPadView>();
                keyPad9.LoadControls();

                InvoiceTotalView invTot9 = _container.Resolve <InvoiceTotalView>();
                // invTot9.LoadControls();
                break;
            }
        }
Ejemplo n.º 4
0
        public void LookupFunction(CustomerLookupDeviceFunctions key)
        {
            switch (key)
            {
            case CustomerLookupDeviceFunctions.MoveCurrentToNext:

                BindingListCollectionView view1 = CollectionViewSource.GetDefaultView(customerDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view1.MoveCurrentToNext();
                this.CustomerSerchListView.ScrollIntoView(this.CustomerSerchListView.Items.CurrentItem);

                break;

            case CustomerLookupDeviceFunctions.MoveCurrentToFirst:

                BindingListCollectionView view2 = CollectionViewSource.GetDefaultView(customerDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view2.MoveCurrentToFirst();
                this.CustomerSerchListView.ScrollIntoView(this.CustomerSerchListView.Items.CurrentItem);

                break;

            case CustomerLookupDeviceFunctions.MoveCurrentToLast:

                BindingListCollectionView view3 = CollectionViewSource.GetDefaultView(customerDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view3.MoveCurrentToLast();
                this.CustomerSerchListView.ScrollIntoView(this.CustomerSerchListView.Items.CurrentItem);

                break;

            case CustomerLookupDeviceFunctions.Cancel:
                /* this.Clear();
                 * PosContext.Instance.CurrentPosDisplay.LoadMenu((int)POSMenu.ItemLookupSeletion);
                 *
                 * */
                break;

            case CustomerLookupDeviceFunctions.Select:
                // if (PosContext.Instance.InputLine.Trim().Length > 0  )
                // {
                PosContext.Instance.InputLine = this.SelectedCustomer();
                new EnterKey().Engage(0);
                // }
                break;

            case CustomerLookupDeviceFunctions.MoveCurrentToPrevious:

                BindingListCollectionView view4 = CollectionViewSource.GetDefaultView(customerDataSet.Tables[0].DefaultView) as BindingListCollectionView;
                view4.MoveCurrentToPrevious();
                this.CustomerSerchListView.ScrollIntoView(this.CustomerSerchListView.Items.CurrentItem);

                break;

            case CustomerLookupDeviceFunctions.Find:
                // if (PosContext.Instance.InputLine.Trim().Length > 0)
                //  {
                this.LoadCustomerBySearchKey("%" + PosContext.Instance.InputLine + "%");
                PosContext.Instance.ClearInput();
                PosContext.Instance.Operprompt.Clear();
                // }
                break;

            case CustomerLookupDeviceFunctions.Clear:
                PosContext.Instance.ClearInput();
                PosContext.Instance.Operprompt.Clear();
                break;

            case CustomerLookupDeviceFunctions.CustomerDetails:

                /*   PosContext.Instance.KeysByControl.Clear();
                 *
                 * object view = _regionManager.Regions[Regions.MenuRegion].GetView("ActiveView");
                 * if (view != null)
                 * {
                 *     _regionManager.Regions[Regions.MenuRegion].Remove(view);
                 * }
                 *
                 * ItemView itemView = _container.Resolve<ItemView>();
                 * _regionManager.Regions[Regions.MenuRegion].Add(itemView, "ActiveView");
                 * itemView.SetDataContext(itemDataSet.Tables[0].DefaultView);
                 * itemView.LoadControls();
                 *
                 * BottomMenuView bottomMenu = _container.Resolve<BottomMenuView>();
                 * bottomMenu.LoadControls();
                 *
                 *
                 * KeyPadView keyPad = _container.Resolve<KeyPadView>();
                 * keyPad.LoadControls();
                 *
                 * InvoiceTotalView invTot = _container.Resolve<InvoiceTotalView>();
                 * invTot.LoadControls();
                 */

                break;

            case CustomerLookupDeviceFunctions.CancelFromCustomerDetails:
                /*
                 * PosContext.Instance.KeysByControl.Clear();
                 *
                 * object view9 = _regionManager.Regions[Regions.MenuRegion].GetView("ActiveView");
                 * if (view9 != null)
                 * {
                 *  _regionManager.Regions[Regions.MenuRegion].Remove(view9);
                 * }
                 *
                 * ItemSearchView itemSearchView = _container.Resolve<ItemSearchView>("ItemSearch");
                 * _regionManager.Regions[Regions.MenuRegion].Add(itemSearchView, "ActiveView");
                 * itemSearchView.LoadControls();
                 *
                 * BottomMenuView bottomMenu9 = _container.Resolve<BottomMenuView>();
                 * bottomMenu9.LoadControls();
                 *
                 *
                 * KeyPadView keyPad9 = _container.Resolve<KeyPadView>();
                 * keyPad9.LoadControls();
                 *
                 * InvoiceTotalView invTot9 = _container.Resolve<InvoiceTotalView>();
                 * invTot9.LoadControls();
                 */
                break;
            }
        }