Index: AAPClient/UI/DnaCodeScherm.pas =================================================================== diff -u -r318 -r322 --- AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 318) +++ AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 322) @@ -43,6 +43,7 @@ procedure PalletBijwerken(Status: DnaCodeStatus; IsDirecteLevering: boolean); procedure ZetIcoontjesBovenaan; procedure DrukProboxEtiketAfIndienNodig; + procedure RondKaderdeurDagAf(); public end; @@ -52,7 +53,7 @@ implementation uses - UiContext, Agent, CommonFunctions, ProScanMain; + UiContext, Agent, CommonFunctions, ProScanMain, Datasnap.DBClient, Data.DB; {$R *.dfm} @@ -141,7 +142,10 @@ ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); imgDirecteLevering.Visible := true; end; - ZetToeleveringStatus(DnaCodeStatus.InBuffer, BepaalDirecteLevering); + if UiContext.Modus = modusKAD then + RondKaderdeurDagAf() + else + ZetToeleveringStatus(DnaCodeStatus.InBuffer, BepaalDirecteLevering); if Self.ModalResult = mrPallet then begin ToonPopupScherm('Toelevering succesvol afgerond','OK','',19,-1,-1,clGreen); UiContext.Toelevering := ''; @@ -357,7 +361,35 @@ lblLaatstGescandData.Caption := TCommonFunctions.VerkorteDnaCode(UiContext.LaatsteDnaCode); imgLaatstGescand.Visible := true; end; +end; +procedure TfmDnaCodeScherm.RondKaderdeurDagAf; +var + Response: RondKaderdeurDagAfResponse; + cdsRondKaderdeurDagAf: TClientDataset; + antwoordlijnTeller: integer; +begin + Response := TAgent.Create(UiContext).RondKaderdeurDagAf(UiContext.LaatsteDnaCode); + cdsRondKaderdeurDagAf := TClientDataset.Create(self); + cdsRondKaderdeurDagAf.FieldDefs.Add('Toelevering',ftString); + cdsRondKaderdeurDagAf.FieldDefs.Add('Aantal deuren',ftInteger); + cdsRondKaderdeurDagAf.FieldDefs.Add('Aantal gescand',ftInteger); + try + if Response.Header.Status = '200' then begin + for antwoordlijnTeller := 0 to System.Length(Response.ToeleveringMetAantallen) -1 do begin + cdsRondKaderdeurDagAf.InsertRecord([Response.ToeleveringMetAantallen[antwoordlijnTeller].ToeleveringID, + Response.ToeleveringMetAantallen[antwoordlijnTeller].AantalKaderdeuren, + Response.ToeleveringMetAantallen[antwoordlijnTeller].AantalKaderdeurenGescand]); + + end; + + end else begin + ToonPopupScherm(Response.Header.Omschrijving, 'Probeer opnieuw'); + end; + Self.ModalResult := mrPallet; + finally + Response.Free; + end; end; procedure TfmDnaCodeScherm.ZetToeleveringStatus(Status: DnaCodeStatus; isDirecteLevering: boolean = false); @@ -375,8 +407,6 @@ finally Response.Free; end; - //PostMessage(Self.Handle,WM_Close,0,0); - //(Self.Parent.Parent As TfmProScanHoofdscherm).NavigeerNaar(Self.ModalResult); end; procedure TfmDnaCodeScherm.DrukProboxEtiketAfIndienNodig;