Na most jó a beküldéshez a Binding

This commit is contained in:
2025-03-24 20:40:38 +01:00
parent 3d44804bad
commit ab1de236be
9 changed files with 134 additions and 29 deletions
@@ -10,9 +10,21 @@ public partial class CheckListPage : ContentPage
{
private readonly ICheckListService _checkListService;
private readonly IUserService _userService;
private bool _isLoading;
public ICommand NewCommand { get; set; }
public ICommand ContinueCommand { get; set; }
public bool IsLoading
{
get => _isLoading;
set
{
_isLoading = value;
OnPropertyChanged(nameof(IsLoading));
}
}
public CheckListPage()
{
@@ -55,13 +67,17 @@ public partial class CheckListPage : ContentPage
}
private async Task LoadCheckListTemplate()
{
IsLoading = true;
var userId = _userService.GetCurrentUser()?.Id;
CheckListTemplate.ItemsSource = await _checkListService.GetCheckListTemplates(userId ?? 1);
IsLoading = false;
}
private async Task LoadCheckList()
{
IsLoading = true;
var userId = _userService.GetCurrentUser()?.Id;
CheckList.ItemsSource = await _checkListService.GetCheckLists(userId ?? 1);
IsLoading = false;
}
}