Barcodes speichern

This commit is contained in:
2024-08-21 00:11:59 +02:00
parent a61aa38d24
commit 423e5f3cd2
12 changed files with 142 additions and 49 deletions

View File

@@ -3,6 +3,7 @@ using CommunityToolkit.Mvvm.Input;
using System.Windows.Input;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Networking;
using ZXing.Net.Maui;
namespace Jugenddienst_Stunden.ViewModels {
@@ -33,6 +34,7 @@ namespace Jugenddienst_Stunden.ViewModels {
public string OvertimeMonth {
get => _hour.overtime_month;
}
public string Title { get; set; } = Preferences.Default.Get("name", "") + " " + Preferences.Default.Get("surname", "");
public StundenViewModel() {
_hour = new Models.Hours();
@@ -43,9 +45,10 @@ namespace Jugenddienst_Stunden.ViewModels {
// await Models.Stunde.LoadData();
public async Task LoadData() {
_hour = await Models.Stunde.LoadData();
Models.Hours Hours = new Models.Hours();
RefreshProperties();
_hour = await Models.Stunde.LoadData();
Models.Hours Hours = new Models.Hours();
//Title = _hour.operator_api.name + " " + _hour.operator_api.surname;
RefreshProperties();
}
private void RefreshProperties() {
@@ -55,8 +58,9 @@ namespace Jugenddienst_Stunden.ViewModels {
OnPropertyChanged(nameof(ZeitCalculated));
OnPropertyChanged(nameof(ZeitDone));
OnPropertyChanged(nameof(Hours));
OnPropertyChanged(nameof(Title));
}
}
}