BarcodeScanner

This commit is contained in:
2024-08-20 12:28:28 +02:00
parent 8e1b391f65
commit a1dfd3b1e7
18 changed files with 138 additions and 163 deletions

View File

@@ -1,6 +1,8 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System.Windows.Input;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Networking;
namespace Jugenddienst_Stunden.ViewModels {
@@ -16,6 +18,12 @@ namespace Jugenddienst_Stunden.ViewModels {
public Models.Hours Hours {
get => _hour;
}
public string ZeitDone {
get => _hour.zeit;
}
public string ZeitCalculated {
get => _hour.zeit_total;
}
public string Nominal {
get => _hour.nominal;
}
@@ -35,14 +43,18 @@ namespace Jugenddienst_Stunden.ViewModels {
// await Models.Stunde.LoadData();
public async Task LoadData() {
_hour = await Models.Stunde.LoadData();
RefreshProperties();
_hour = await Models.Stunde.LoadData();
Models.Hours Hours = new Models.Hours();
RefreshProperties();
}
private void RefreshProperties() {
OnPropertyChanged(nameof(Nominal));
OnPropertyChanged(nameof(Overtime));
OnPropertyChanged(nameof(OvertimeMonth));
OnPropertyChanged(nameof(ZeitCalculated));
OnPropertyChanged(nameof(ZeitDone));
OnPropertyChanged(nameof(Hours));
}
}