Beispiel #1
0
        /// <summary>
        /// LoadCollectors
        /// </summary>
        private void LoadCollectors()
        {
            IList <CollectorModel> model = new List <CollectorModel>();

            collectorProvider = new CollectorService.Provider();

            var collectors = collectorProvider.RetrieveCollectors();

            foreach (var collector in collectors)
            {
                var frequency = collectorProvider.RetrieveFrequency(collector.Id);

                model.Add(new CollectorModel
                {
                    Name            = collector.Name,
                    Address         = collector.Address,
                    Mobile          = collector.Mobile,
                    Ward            = collector.Ward,
                    PickupFrequency = frequency.PickupFrequency,
                    FrequencyType   = frequency.FrequencyType,
                    SlotFrom1       = frequency.SlotFrom1,
                    SlotTo1         = frequency.SlotTo1,
                    SlotFrom2       = frequency.SlotFrom2,
                    SlotTo2         = frequency.SlotTo2,
                    SlotFrom3       = frequency.SlotFrom3,
                    SlotTo3         = frequency.SlotTo3,
                    Capacity        = frequency.Capacity,
                    LastUpdateDate  = frequency.LastUpdateDate
                });
            }

            gridControlCollectors.DataSource = model;
        }
 /// <summary>
 /// Window_Loaded
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     provider = new CollectorService.Provider();
     dgCollectors.ItemsSource = provider.RetrieveCollectors();
 }
Beispiel #3
0
 /// <summary>
 /// Window_Loaded
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     provider = new CollectorService.Provider();
     dgCollectors.ItemsSource = provider.RetrieveCollectors();
 }
Beispiel #4
0
        /// <summary>
        /// LoadCollectors
        /// </summary>
        private void LoadCollectors()
        {
            IList<CollectorModel> model = new List<CollectorModel>();
            collectorProvider = new CollectorService.Provider();

            var collectors = collectorProvider.RetrieveCollectors();

            foreach (var collector in collectors)
            {
                var frequency = collectorProvider.RetrieveFrequency(collector.Id);

                model.Add(new CollectorModel
                {
                    Name = collector.Name,
                    Address = collector.Address,
                    Mobile = collector.Mobile,
                    Ward = collector.Ward,
                    PickupFrequency = frequency.PickupFrequency,
                    FrequencyType = frequency.FrequencyType,
                    SlotFrom1 = frequency.SlotFrom1,
                    SlotTo1 = frequency.SlotTo1,
                    SlotFrom2 = frequency.SlotFrom2,
                    SlotTo2 = frequency.SlotTo2,
                    SlotFrom3 = frequency.SlotFrom3,
                    SlotTo3 = frequency.SlotTo3,
                    Capacity = frequency.Capacity,
                    LastUpdateDate = frequency.LastUpdateDate
                });
            }

            gridControlCollectors.DataSource = model;
        }