Пример #1
0
        void client_getItemsByUserIdCompleted(object sender, getItemsByUserIdCompletedEventArgs e)
        {
            // this.LbItems.DataContext = e.Result[0];

            this.pp.Visibility = Visibility.Visible;
            //  List<Items> list = e.Result.ToList<Items>();
            //LbEwaste.DataContext = e.Result.Where(c => c.CategoryId == 0);
            LbEwaste.ItemsSource  = e.Result.Where(c => c.CategoryId == 0);
            LbMetal.ItemsSource   = e.Result.Where(c => c.CategoryId == 1);
            LbFabric.ItemsSource  = e.Result.Where(c => c.CategoryId == 2);
            LbPlastic.ItemsSource = e.Result.Where(c => c.CategoryId == 3);
            LbPaper.ItemsSource   = e.Result.Where(c => c.CategoryId == 4);
            LbGlass.ItemsSource   = e.Result.Where(c => c.CategoryId == 5);
        }
Пример #2
0
 void client_getItemsByUserIdCompleted(object sender, getItemsByUserIdCompletedEventArgs e)
 {
    // this.LbItems.DataContext = e.Result[0];
   
     this.pp.Visibility = Visibility.Visible;
   //  List<Items> list = e.Result.ToList<Items>();
     //LbEwaste.DataContext = e.Result.Where(c => c.CategoryId == 0);
     LbEwaste.ItemsSource = e.Result.Where(c => c.CategoryId == 0);
     LbMetal.ItemsSource = e.Result.Where(c => c.CategoryId == 1);
     LbFabric.ItemsSource = e.Result.Where(c => c.CategoryId == 2);
     LbPlastic.ItemsSource = e.Result.Where(c => c.CategoryId == 3);
     LbPaper.ItemsSource = e.Result.Where(c => c.CategoryId == 4);
     LbGlass.ItemsSource = e.Result.Where(c => c.CategoryId == 5);
 }