private void brandComboBox_Changed(object sender, RoutedEventArgs e) { modelTextblock.Visibility = Visibility.Visible; modelComboBox.Visibility = Visibility.Visible; Modele.Clear(); Years.Clear(); List <string> modele = new List <string>(); try { modele = (from m in _db.import where m.make == MyItem select m.model).Distinct().ToList(); foreach (var i in modele) { Modele.Add(i); //Console.WriteLine(i); } NotifyPropertyChanged("Modele"); } catch { Console.WriteLine("ex1"); return; } //Console.WriteLine(item.Content.ToString()); //modelComboBox.ItemsSource = modele; }
private void GetCarModels(int RefCarMakeId) { CarModelList = CarModels.GetByRefCarMakeId(RefCarMakeId).ToSvenTechCollection(); CarBodyList.Clear(); CarGenerationList.Clear(); CarTrimList.Clear(); Years.Clear(); CarEngine = null; }
/// <summary> /// 设置年范围 /// </summary> /// <param name="start"></param> /// <param name="end"></param> public void SetYearRange(int start, int end) { Years.Clear(); StartYear = start; EndYear = end; for (int i = start; i < end + 1; i++) { Years.Add(i); } }
public void CalculateResults() { Years.Clear(); var expenses = _expenseRepository.Load(); var expensesPerYear = expenses.GroupBy(e => e.Date.Year); var yearPresentations = expensesPerYear .Select(yearExpense => new YearResultsPresentation(yearExpense.Key, yearExpense.ToArray(), _categorizer)); Years.AddRange(yearPresentations); }
private void GetCarBodies(int RefCarModelId) { CarBodyList = CarBodies.GetByRefCarModelId(RefCarModelId).ToSvenTechCollection(); CarGenerationList.Clear(); CarTrimList.Clear(); Years.Clear(); CarEngine = null; if (CarBodyList?.Count == 1) { SelectedCarBody = CarBodyList.First(); } }
public void Rebuild(IEnumerable <Song> songs) { Albums.Clear(); Artists.Clear(); Years.Clear(); Geneires.Clear(); foreach (var s in songs) { Albums.Add(s.Album); Artists.Add(s.Artist); Years.Add(s.Year.ToString()); Geneires.Add(s.Genre); } }
private void GetYears() { Years.Clear(); Years.Add("2020"); Years.Add("2021"); Years.Add("2022"); Years.Add("2023"); Years.Add("2024"); Years.Add("2025"); Years.Add("2026"); Years.Add("2027"); Years.Add("2028"); Years.Add("2029"); Years.Add("2030"); Years.Add("2031"); Years.Add("2032"); Years.Add("2033"); Years.Add("2034"); Years.Add("2035"); Years.Add("2036"); Years.Add("2037"); Years.Add("2038"); Years.Add("2039"); Years.Add("2040"); Years.Add("2041"); Years.Add("2042"); Years.Add("2043"); Years.Add("2044"); Years.Add("2045"); Years.Add("2046"); Years.Add("2047"); Years.Add("2048"); Years.Add("2049"); Years.Add("2050"); Years.Add("2051"); Years.Add("2052"); Years.Add("2053"); Years.Add("2054"); Years.Add("2055"); Years.Add("2056"); Years.Add("2057"); Years.Add("2058"); Years.Add("2059"); Years.Add("2060"); }
private void modelComboBox_Changed(object sender, RoutedEventArgs e) { yearTextblock.Visibility = Visibility.Visible; yearComboBox.Visibility = Visibility.Visible; Years.Clear(); List <Int64> years = new List <Int64>(); years = (from m in _db.import where m.make == MyItem && m.model == MyItem2 select m.year).Distinct().ToList(); foreach (var i in years) { Years.Add(i.ToString()); Console.WriteLine(i); } try { NotifyPropertyChanged("Years"); } catch { Console.WriteLine("ex1"); return; } }