37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
namespace Common.UI.ViewModels
|
|
{
|
|
using Common.UI.Infrastructure;
|
|
using Common.UI.Models;
|
|
|
|
using System.Linq;
|
|
using System.Windows;
|
|
|
|
public class EregisterFinalizeVM : EregisterInitializeVM
|
|
{
|
|
public EregisterFinalizeVM()
|
|
: base()
|
|
=> this.WindowTitle = "Prüfungsabschluss";
|
|
|
|
protected override void PrepareProgramming()
|
|
{
|
|
if (!int.TryParse($"{Appsettings.GetSetting("PSNR")}", out var psnr))
|
|
{
|
|
MessageBox.Show("Prüfstationnummer ist nicht configuriert.", "Fehler");
|
|
|
|
return;
|
|
}
|
|
|
|
this.sharedId = AuftragDbContext.P2000Shared.FindSharedId(psnr, "EregisterFinalize");
|
|
var parametersList = AuftragDbContext.LoadEregisterProgrammingParametersListForSharedId(this.sharedId);
|
|
|
|
this.LoadEncryptionKeysAsync(parametersList).Wait();
|
|
|
|
var programmingTasksEnumerable = this.eregisterFactory
|
|
.LoadInspectionFinalizationTasks(parametersList)
|
|
.ToList();
|
|
|
|
this.UpdateUIProgrammingTasks(programmingTasksEnumerable);
|
|
}
|
|
}
|
|
}
|