Ejemplo n.º 1
0
 private void GetCarModels(int RefCarMakeId)
 {
     CarModelList = CarModels.GetByRefCarMakeId(RefCarMakeId).ToSvenTechCollection();
     CarBodyList.Clear();
     CarGenerationList.Clear();
     CarTrimList.Clear();
     Years.Clear();
     CarEngine = null;
 }
Ejemplo n.º 2
0
 private void GetCarMakes()
 {
     CarMakeList = CarMakes.GetAll().ToSvenTechCollection();
     CarModelList.Clear();
     CarBodyList.Clear();
     CarGenerationList.Clear();
     CarTrimList.Clear();
     CarEngine = null;
 }
Ejemplo n.º 3
0
        private void GetCarGeneration()
        {
            var generationIds = tmpCarTrimList.Where(x => x.Year == selectedYear).Select(x => x.RefCarGenerationId);

            CarGenerationList = tmpCarGenerationList.Where(x => generationIds.Contains(x.CarGenerationId)).ToSvenTechCollection();
            CarTrimList.Clear();
            if (CarGenerationList?.Count == 1)
            {
                SelectedCarGeneration = CarGenerationList.FirstOrDefault();
            }

            CarEngine = null;
        }
Ejemplo n.º 4
0
        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();
            }
        }
Ejemplo n.º 5
0
        private void GetYears(int RefCarModelId)
        {
            tmpCarGenerationList = CarGenerations.GetByRefCarModelId(RefCarModelId);
            CarTrimList.Clear();
            foreach (var item in tmpCarGenerationList)
            {
                var tmp = CarTrims.GetByRefCarGenerationId(item.CarGenerationId);
                foreach (var trim in tmp)
                {
                    tmpCarTrimList.Add(trim);
                }
            }
            var tmpYears = tmpCarTrimList.Select(x => x.Year).ToList();

            tmpYears.Sort();
            Years = tmpYears.Distinct().ToSvenTechCollection();
            CarGenerationList.Clear();
        }