BUGFIX valu mentésére

This commit is contained in:
2025-07-07 14:57:40 +02:00
parent affad21ab0
commit 24c49567aa
4 changed files with 22 additions and 6 deletions
@@ -19,7 +19,7 @@ namespace WorkFlowCheck.MAUI.Helper
public static string DatabaseName = "";
public static bool Syncronised = false;
public static UserDTO SystemUserDTO;
public static string ProgramVersion = "v1.1.038";
public static string ProgramVersion = "v1.1.039";
#if DEBUG
//public static string ApiBaseUrl = $"http://10.0.2.2:59027/";
@@ -162,6 +162,7 @@
<Entry Grid.Column="3"
Text="{Binding Answer}"
HorizontalTextAlignment="Center"
TextChanged="V_Entry_Text_Changed"
VerticalOptions="Center" />
</Grid>
</Frame>
@@ -124,14 +124,19 @@ public partial class CheckListWorkPage : ContentPage
if (checkListRowDTO != null)
{
checkListRowDTO.Answer = checkListRowCS.Answer;
if (checkListRowCS.AnswerYes == true)
{
checkListRowDTO.Answer = "Igen";
}
if (checkListRowCS.AnswerNo == true)
else if (checkListRowCS.AnswerNo == true)
{
checkListRowDTO.Answer = "Nem";
}
else
{
checkListRowDTO.Answer = checkListRowCS.Answer;
}
await _checkListService.UpdateCheckListRow(checkListRowDTO, withReload);
}
}
@@ -249,6 +254,15 @@ public partial class CheckListWorkPage : ContentPage
IsLoading = false;
}
private void V_Entry_Text_Changed(object sender, TextChangedEventArgs e)
{
var entry = sender as Entry;
var model = entry?.BindingContext as CheckListRowCS;
if (model != null)
{
model.Answer = e.NewTextValue;
}
}
}
public class BindableRadioButton : RadioButton
{
@@ -328,7 +328,8 @@ namespace WorkFlowCheck.MAUI.Services
.Include(i => i.CheckListTemplateRow)
.ThenInclude(i => i.CheckPoint)
.Where(w => w.CheckListHeaderId == checkListHeaderDTO.Id
&& string.IsNullOrEmpty(w.Answer.Trim()))
&& string.IsNullOrEmpty(w.Answer.Trim())
&& w.CheckListTemplateRow.AnswerType != "PN")
.Select(w => w.CheckListTemplateRow.CheckPoint)
.OrderBy(cp => cp.ShortName)
.FirstOrDefaultAsync();