public CreateAimViewModel(INavigationService navigation, IAimManager manager) { SaveCommand = new RelayCommand(async() => { var errorDetails = IsAimFilledCorrectly(); if (errorDetails == null) { await manager.SaveChangesAsync(new AimModel { Name = Name, CurrentBalance = CurrentBalance, FinalBalance = FinalBalance, FinalDate = FinalDate.Value, StartDate = StartDate.Value, }); navigation.NavigateTo(PageKeys.MAIN_PAGE); } else { Error = errorDetails; } }); }
public AimActionsViewModel(IAimManager aimManager) { _aimManager = aimManager; }