Example #1
0
 public AddExpensePageViewModel(INavigationService navigationService,
                                IApiService apiService,
                                IFilesHelper filesHelper) : base(navigationService)
 {
     _navigationService = navigationService;
     _apiService        = apiService;
     _filesHelper       = filesHelper;
     Title        = Languages.AddExpense;
     Image        = App.Current.Resources["UrlNoImage"].ToString();
     IsRunning    = false;
     IsEnabled    = true;
     _user        = JsonConvert.DeserializeObject <UserResponse>(Settings.User);
     _trip        = JsonConvert.DeserializeObject <TripResponse>(Settings.TripSelected);
     ExpenseTypes = new ObservableCollection <ExpenseType>(CombosHelper.GetExpenseTypes());
     Expense      = new ExpenseRequest
     {
         Date = DateTime.UtcNow.ToLocalTime()
     };
 }