Exemplo n.º 1
0
 private void FillFilterLists()
 {
     StatusList = new ObservableCollection <string>(
         ApartmentList.Select(c => c.StatusSaleName)
         .Distinct()
         .ToList());
     HouseAddressList = new ObservableCollection <string>(
         ApartmentList.Select(c => c.HouseAddress)
         .Distinct()
         .ToList());
     FloorList = new ObservableCollection <int>(
         ApartmentList.Select(c => c.Floor)
         .Distinct()
         .OrderBy(c => c)
         .ToList());
     PorchList = new ObservableCollection <int>(
         ApartmentList.Select(c => c.Porch)
         .Distinct()
         .OrderBy(c => c)
         .ToList());
     ComplexList = new ObservableCollection <string>(
         ApartmentList.Select(c => c.NameHousingComplex)
         .Distinct()
         .OrderBy(c => c)
         .ToList());
 }