Lejönnek a CheckPointhoz tartozó sorok
This commit is contained in:
@@ -2,16 +2,19 @@
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="WorkFlowCheck.MAUI.Pages.BaseStock.CheckPoints.CheckPointEditPage"
|
||||
Title="CheckPointEditPage">
|
||||
Title="{Binding CheckPointDTO.ShortName}">
|
||||
<StackLayout Padding="20">
|
||||
<!-- Cím: Edit Item -->
|
||||
<Label Text="Edit Item" FontSize="24" HorizontalOptions="Center" />
|
||||
<Label Text="Ellenőrzési pont adatai" FontSize="24" HorizontalOptions="Center" />
|
||||
|
||||
<!-- Editálható név mező -->
|
||||
<Entry Text="{Binding CheckPointDTO.ShortName}" Placeholder="Edit item name" />
|
||||
<Entry Text="{Binding CheckPointDTO.Code}" Placeholder="Edit item name" />
|
||||
|
||||
<Grid ColumnSpacing="10">
|
||||
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
|
||||
<VerticalStackLayout>
|
||||
<!-- Editálható név mező -->
|
||||
<Entry Text="{Binding CheckPointDTO.ShortName}" Placeholder="Edit item name" />
|
||||
<Entry Text="{Binding CheckPointDTO.Code}" Placeholder="Edit item name" />
|
||||
</VerticalStackLayout>
|
||||
</Frame>
|
||||
<Grid ColumnSpacing="46" Margin="0,10,0,10">
|
||||
<!-- 10 pixel térköz az oszlopok között -->
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
@@ -23,5 +26,19 @@
|
||||
<Button Text="Save" Command="{Binding SaveCommand}" Grid.Column="0"/>
|
||||
<Button Text="Cancel" Command="{Binding CancelCommand}" Grid.Column="2"/>
|
||||
</Grid>
|
||||
<Label Text="Ellenőrzési feladatok" FontAttributes="Bold" FontSize="Medium" HorizontalOptions="Center" />
|
||||
<Frame BorderColor="Gray" Padding="10" Margin="5" HasShadow="True" CornerRadius="2">
|
||||
<CollectionView x:Name="CheckPointCheckListRows" HeightRequest="440">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Frame BorderColor="Gray" Padding="10" Margin="5" HasShadow="True" CornerRadius="2">
|
||||
<StackLayout>
|
||||
<Label Text="{Binding OperationDescription}" FontSize="16" FontAttributes="Bold" />
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</Frame>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
@@ -19,6 +19,15 @@ public partial class CheckPointEditPage : ContentPage
|
||||
SaveCommand = new Command(OnSave);
|
||||
CancelCommand = new Command(OnCancel);
|
||||
|
||||
LoadCheckPointCheckListRows();
|
||||
}
|
||||
private void LoadCheckPointCheckListRows()
|
||||
{
|
||||
//IsRefreshing = true;
|
||||
//await _syncService.SyncDatas();
|
||||
CheckPointCheckListRows.ItemsSource = CheckPointDTO.CheckListTemplateRowDTO;
|
||||
//IsRefreshing = false;
|
||||
//OnPropertyChanged(nameof(IsRefreshing));
|
||||
}
|
||||
private async void OnSave()
|
||||
{
|
||||
|
||||
@@ -78,6 +78,23 @@ public partial class CheckPointsPage : ContentPage
|
||||
|
||||
}
|
||||
}
|
||||
async Task EndListening()
|
||||
{
|
||||
try
|
||||
{
|
||||
MainThread.BeginInvokeOnMainThread(() =>
|
||||
{
|
||||
UnsubscribeEvents();
|
||||
CrossNFC.Current.StopPublishing();
|
||||
CrossNFC.Current.StopListening();
|
||||
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
void SubscribeEvents()
|
||||
{
|
||||
if (_eventsAlreadySubscribed)
|
||||
@@ -106,8 +123,8 @@ public partial class CheckPointsPage : ContentPage
|
||||
{
|
||||
_checkPointDTO.Code = serialNumber;
|
||||
await _baseStockService.UpdateCheckPoint(_checkPointDTO);
|
||||
//CrossNFC.Current.StopListening();
|
||||
UnsubscribeEvents();
|
||||
await Task.Delay(500);
|
||||
await EndListening();
|
||||
await LoadCheckPoints();
|
||||
}
|
||||
_onReceiveing = false;
|
||||
|
||||
Reference in New Issue
Block a user