public void AddComponentToConfiguration(IPCComponent pCComponent) { if (pCComponent == null) { return; } ChosenPCComponents.Add(pCComponent); }
public bool ApplyChanges() { PCConfigurationBaseViewModel pCConfigurationViewModel = new PCConfigurationViewModel(); pCConfigurationViewModel.PCComponents = ChosenPCComponents.ToList(); if ((ConfigurationType & ConfigurationType.ExtraOrdinary) == ConfigurationType.ExtraOrdinary) { pCConfigurationViewModel = new ExtraordinaryPCConfiguration(pCConfigurationViewModel, Coefficient ?? 0); } TotalPrice = pCConfigurationViewModel.CalculateTotalConfigurationPrice(); return(true); }