private void SetupFields() { RestorationModel editableRestor = _restoration; RestorationKind = editableRestor?.RestorationKind ?? RestorationKind.Косметическая; Periodicity = editableRestor?.Periodicity ?? "1 раз в год"; Outlays = editableRestor?.Outlays ?? 0; }
public RestorationUpdateViewModel(IRestorationsManager restorationManager) { _restorationManager = restorationManager; _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("RepairInternal"); _restoration = _customNavigationService.CurrentPageParams as RestorationModel; SaveChangesCommand = new RelayCommand(async() => await UpdateRestoration()); ActionText = "Редактирование"; ButtonText = "Сохранить изменения"; InitData(); SetupFields(); }