Index: AAPClient/UI/PalletScherm.pas =================================================================== diff -u -r306 -r310 --- AAPClient/UI/PalletScherm.pas (.../PalletScherm.pas) (revision 306) +++ AAPClient/UI/PalletScherm.pas (.../PalletScherm.pas) (revision 310) @@ -24,6 +24,7 @@ procedure SetContext; procedure SetModus(GescandeInput: string); function ValideerPalletCode(GescandeInput: string): boolean; + function IsKaderdeurLocatie(GescandeInput: string): boolean; public { Public declarations } end; @@ -34,7 +35,7 @@ implementation uses - DnaCodeService, UiContext, Agent, ProScanMain, StrUtils; + DnaCodeService, UiContext, Agent, ProScanMain, StrUtils, System.RegularExpressions; {$R *.dfm} @@ -47,7 +48,6 @@ procedure TfmPalletScherm.actVolgendeExecute(Sender: TObject); var - fValideerPalletCodeResponse: ValideerPalletCodeResponse; fZoekViaPalletCodeResponse: ZoekViaPalletCodeResponse; fZoekViaToeleveringResponse: ZoekViaToeleveringResponse; fPalletGevalideerd: boolean; @@ -168,12 +168,19 @@ procedure TfmPalletScherm.SetModus(GescandeInput: string); begin - if GescandeInput = '10K12T01' then //andere locaties moeten er nog bij komen + if IsKaderdeurLocatie(GescandeInput) then UiContext.Modus := modusKAD else if (Length(GescandeInput)=10) and StartsText('O1',GescandeInput) then UiContext.Modus := modusVHOSS else Uicontext.Modus := modusDefault; end; +function TfmPalletScherm.IsKaderdeurLocatie(GescandeInput: string): boolean; +begin + result := false; + if TRegEx.IsMatch(GescandeInput,'10K1.T0.') then + result := true; +end; + end.