Index: AAPClient/UI/DnaCodeReedsGescandScherm.pas =================================================================== diff -u -r242 -r246 --- AAPClient/UI/DnaCodeReedsGescandScherm.pas (.../DnaCodeReedsGescandScherm.pas) (revision 242) +++ AAPClient/UI/DnaCodeReedsGescandScherm.pas (.../DnaCodeReedsGescandScherm.pas) (revision 246) @@ -5,7 +5,7 @@ uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, DrieKnoppenScherm, Vcl.ActnList, - Vcl.StdCtrls, Vcl.ExtCtrls; + Vcl.StdCtrls, Vcl.ExtCtrls, DnaCodeService; type TfmDnaCodeReedsGescandScherm = class(TfmDrieKnoppenScherm) @@ -25,6 +25,7 @@ procedure Wegnemen; procedure Verplaatsen; procedure SetPalletControlsVisibility(IsVisible: boolean); + function GeefStatusVanDnaCode(Code: string): DnaCodeStatus; public { Public declarations } end; @@ -35,7 +36,7 @@ implementation uses - UiContext, DnaCodeService, Agent, CommonFunctions, ProScanMain; + UiContext, Agent, CommonFunctions, ProScanMain; {$R *.dfm} @@ -49,6 +50,8 @@ procedure TfmDnaCodeReedsGescandScherm.btnVerplaatsenClick(Sender: TObject); begin inherited; + if GeefStatusVanDnaCode(UiContext.LaatsteDnaCode) = DnaCodeStatus.InBuffer then + ToonPopupScherm('Reeds afgesloten. Gebruik ''Hernoem Pallet''', 'Probeer opnieuw',''); SetPalletControlsVisibility(true); end; @@ -125,4 +128,20 @@ (Self.Parent.Parent As TfmProScanHoofdscherm).NavigeerNaar(mrDnaCode); end; +function TfmDnaCodeReedsGescandScherm.GeefStatusVanDnaCode(Code: string): DnaCodeStatus; +var + Response: ZoekViaDnaCodeResponse; +begin + Response := TAgent.Create(UiContext).ZoekViaDnaCode(Code); + try + begin + if Assigned(Response.DnaCodes) then begin + result := DnaCodeStatus(Response.DnaCodes[0].Status); + end; + end; + finally + Response.Free; + end; +end; + end.