Alap funkció működés CheckPoints
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="WorkFlowCheck.MAUI.Pages.BaseStock.CheckPointsPage"
|
||||
Title="Ellenőrzési pontok">
|
||||
<CollectionView x:Name="CheckPointsList">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Frame BorderColor="Gray" Padding="10" Margin="5" HasShadow="True">
|
||||
<StackLayout>
|
||||
<Label Text="{Binding ShortName}" FontSize="16" FontAttributes="Bold" />
|
||||
<Label Text="{Binding Code}" FontSize="14" />
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</ContentPage>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Input;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using WorkFlowCheck.MAUI.Services.Interfaces;
|
||||
|
||||
namespace WorkFlowCheck.MAUI.Pages.BaseStock;
|
||||
|
||||
public partial class CheckPointsPage : ContentPage
|
||||
{
|
||||
private readonly IBaseStockService _baseStockService;
|
||||
private readonly ISyncService _syncService;
|
||||
|
||||
|
||||
public CheckPointsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
_baseStockService = MauiProgram.ServiceProvider.GetRequiredService<IBaseStockService>();
|
||||
_syncService= MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
|
||||
}
|
||||
protected override async void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
await LoadCheckPoints();
|
||||
}
|
||||
private async Task LoadCheckPoints()
|
||||
{
|
||||
await _syncService.SyncDatas();
|
||||
CheckPointsList.ItemsSource = await _baseStockService.GetAllCheckPoints();
|
||||
}
|
||||
|
||||
protected override bool OnBackButtonPressed()
|
||||
{
|
||||
Shell.Current.GoToAsync("//BaseStockPage");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user