Example #1
0
        private async Task SwitchPrepay()
        {
            var newPumpId = Convert.ToInt32(PumpList.ElementAt(SelectedPumpNumberIndex), CultureInfo.InvariantCulture);
            var response  = await _fuelBusinessLogic.SwitchPrepay(_pumpId, newPumpId);

            PerformHomeNavigation();
        }
Example #2
0
 private void EODReport_Load(object sender, EventArgs e)
 {
     DepSalesList.ClearSelection();
     CatList.ClearSelection();
     PayList.ClearSelection();
     OverList.ClearSelection();
     PumpList.ClearSelection();
 }
Example #3
0
        private void SetNumberOfPumps(int numberOfPumps)
        {
            PumpList.Clear();
            for (int i = 1; i <= numberOfPumps; i++)
            {
                PumpList.Add(i.ToString());
            }

            PumpList.Remove(_pumpId.ToString());
        }
Example #4
0
        private static void OnItemsSourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            JumpListBox jumpListBox = sender as JumpListBox;
            if (jumpListBox == null)
                throw new ArgumentException("The sender must be a JumpListBox");

            IEnumerable items = e.NewValue as IEnumerable;

            var collection = new AlphabetizedCollection(jumpListBox.IndexedMember, jumpListBox.ImageMember);
            collection.AddRange(items);

            _orderedCollection = collection.OrderBy(c => c.FirstLetter).ToList();

            jumpListBox.mainListBox.DataContext = null;
            jumpListBox._jumpListSelector.ItemsSource = collection;

            if (jumpListBox.IsPumped)
            {
                PumpList<AlphabetizedItemContainer> pumpList =
                    new PumpList<AlphabetizedItemContainer>(_orderedCollection);
                jumpListBox.mainListBox.ItemsSource = pumpList.Items;

                pumpList.StartPump();
            }
            else
                jumpListBox.mainListBox.ItemsSource = _orderedCollection;

        }