Index: AAPClient/UI/PopupScherm.dfm =================================================================== diff -u -r245 -r324 --- AAPClient/UI/PopupScherm.dfm (.../PopupScherm.dfm) (revision 245) +++ AAPClient/UI/PopupScherm.dfm (.../PopupScherm.dfm) (revision 324) @@ -35,6 +35,21 @@ Layout = tlCenter WordWrap = True end + object dbgPopup: TDBGrid + Left = 0 + Top = 207 + Width = 392 + Height = 154 + DataSource = dsPopup + Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit, dgMultiSelect, dgTitleClick, dgTitleHotTrack] + TabOrder = 3 + TitleFont.Charset = DEFAULT_CHARSET + TitleFont.Color = clWindowText + TitleFont.Height = -16 + TitleFont.Name = 'Tahoma' + TitleFont.Style = [] + Visible = False + end object pnlbtnActie1: TPanel Left = 48 Top = 444 @@ -144,4 +159,8 @@ Height = 128 end end + object dsPopup: TDataSource + Left = 24 + Top = 360 + end end Index: AAPClient/UI/DrieKnoppenScherm.pas =================================================================== diff -u -r241 -r324 --- AAPClient/UI/DrieKnoppenScherm.pas (.../DrieKnoppenScherm.pas) (revision 241) +++ AAPClient/UI/DrieKnoppenScherm.pas (.../DrieKnoppenScherm.pas) (revision 324) @@ -49,7 +49,7 @@ function ComputerName: String; function WUserName: String; function FullName: String; - function ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; imgCentraalIndex: integer = 13; ImageIndex1: integer = -1; ImageIndex2: integer = -1; knopkleur: TColor = $001717CD): TModalResult; + function ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; imgCentraalIndex: integer = 13; ImageIndex1: integer = -1; ImageIndex2: integer = -1; knopkleur: TColor = $001717CD; ClientDataSet: TClientDataSet = nil): TModalResult; public property UiContext: TUiContext Read fUiContext Write fUiContext; end; @@ -126,9 +126,10 @@ end; end; -function TfmDrieKnoppenScherm.ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; imgCentraalIndex: integer = 13; ImageIndex1: integer = -1; ImageIndex2: integer = -1;knopkleur: TColor = $001717CD): TModalResult; +function TfmDrieKnoppenScherm.ToonPopupScherm(Melding, Actie1: String; Actie2: String = ''; imgCentraalIndex: integer = 13; ImageIndex1: integer = -1; ImageIndex2: integer = -1;knopkleur: TColor = $001717CD; ClientDataSet: TClientDataSet = nil): TModalResult; var PopupScherm: TfmPopupScherm; + kolomteller, rijteller: integer; begin PopupScherm := TfmPopupScherm.Create(self); @@ -174,6 +175,20 @@ PopupScherm.imgActie2.BringToFront; end; + if Assigned(ClientDataSet) then begin + PopupScherm.dbgPopup.Visible := true; + PopupScherm.pnlGroteImage.Visible := false; + for kolomteller := 0 to ClientDataSet.FieldCount-1 do begin + PopupScherm.dbgPopup.Columns.Add; + PopupScherm.dbgPopup.Columns[kolomteller].FieldName := ClientDataSet.FieldDefs[kolomteller].Name; + PopupScherm.dbgPopup.Columns[kolomteller].Field := ClientDataSet.Fields[kolomteller]; + PopupScherm.dbgPopup.Columns[kolomteller].Width := PopupScherm.dbgPopup.Width div ClientDataSet.FieldCount; + end; + PopupScherm.dsPopup.Dataset := ClientDataSet; + ClientDataSet.Open; + end; + + result := PopupScherm.ShowModal; end; Index: AAPClient/UI/PopupScherm.pas =================================================================== diff -u -r245 -r324 --- AAPClient/UI/PopupScherm.pas (.../PopupScherm.pas) (revision 245) +++ AAPClient/UI/PopupScherm.pas (.../PopupScherm.pas) (revision 324) @@ -5,7 +5,7 @@ uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Imaging.pngimage, - Vcl.ExtCtrls, DimmerForm; + Vcl.ExtCtrls, DimmerForm, Data.DB, Vcl.Grids, Vcl.DBGrids; type TfmPopupScherm = class(TForm) @@ -18,6 +18,8 @@ imgCentraal: TImage; lblActie1: TLabel; lblActie2: TLabel; + dbgPopup: TDBGrid; + dsPopup: TDataSource; procedure pnlbtnActie1Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure pnlbtnActie2Click(Sender: TObject); Index: AAPClient/UI/DnaCodeScherm.pas =================================================================== diff -u -r323 -r324 --- AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 323) +++ AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 324) @@ -137,33 +137,34 @@ inherited; if UiContext.Toelevering = '' then exit; - if lblAantalGescand.Caption = lblTotaalAantal.Caption then begin - if BepaalDirecteLevering then begin - ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); - imgDirecteLevering.Visible := true; - end; - //if UiContext.Modus = modusKAD then - // RondKaderdeurDagAf() - //else + + if UiContext.Modus = modusKAD then + RondKaderdeurDagAf() + else begin + if lblAantalGescand.Caption = lblTotaalAantal.Caption then begin + if BepaalDirecteLevering then begin + ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); + imgDirecteLevering.Visible := true; + end; ZetToeleveringStatus(DnaCodeStatus.InBuffer, BepaalDirecteLevering); - if Self.ModalResult = mrPallet then begin - ToonPopupScherm('Toelevering succesvol afgerond','OK','',19,-1,-1,clGreen); - UiContext.Toelevering := ''; - if System.StrUtils.LeftStr(UiContext.Pallet,3) = 'TBP' then - DrukProboxEtiketAfIndienNodig; - end; - end else begin - fWaarschuwingModalResult := ToonPopupScherm('Onvolledige toelevering','Scan code','Nieuw',18,11,12); - if fWaarschuwingModalResult = mrYes then begin - Self.ModalResult := mrDnaCode; + if Self.ModalResult = mrPallet then begin + ToonPopupScherm('Toelevering succesvol afgerond','OK','',19,-1,-1,clGreen); + UiContext.Toelevering := ''; + if System.StrUtils.LeftStr(UiContext.Pallet,3) = 'TBP' then + DrukProboxEtiketAfIndienNodig; + end; end else begin - fWaarschuwingModalResult := ToonPopupScherm('Nieuwe toelevering starten?','Ja','Nee',14,6,7); + fWaarschuwingModalResult := ToonPopupScherm('Onvolledige toelevering','Scan code','Nieuw',18,11,12); if fWaarschuwingModalResult = mrYes then begin - ZetToeleveringStatus(DnaCodeStatus.OnHold); - Self.ModalResult := mrPallet; + Self.ModalResult := mrDnaCode; + end else begin + fWaarschuwingModalResult := ToonPopupScherm('Nieuwe toelevering starten?','Ja','Nee',14,6,7); + if fWaarschuwingModalResult = mrYes then begin + ZetToeleveringStatus(DnaCodeStatus.OnHold); + Self.ModalResult := mrPallet; + end; end; end; - end; PostMessage(Self.Handle,WM_Close,0,0); (Self.Parent.Parent As TfmProScanHoofdscherm).NavigeerNaar(Self.ModalResult); @@ -372,18 +373,18 @@ begin Response := TAgent.Create(UiContext).RondKaderdeurDagAf(UiContext.LaatsteDnaCode); cdsRondKaderdeurDagAf := TClientDataset.Create(self); - cdsRondKaderdeurDagAf.FieldDefs.Add('Toelevering',ftString); + cdsRondKaderdeurDagAf.FieldDefs.Add('Toelevering',ftString,20); cdsRondKaderdeurDagAf.FieldDefs.Add('Aantal deuren',ftInteger); cdsRondKaderdeurDagAf.FieldDefs.Add('Aantal gescand',ftInteger); try + cdsRondKaderdeurDagAf.CreateDataSet; 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; - //ToonPopupScherm('Deze zijn nog niet compleet','Ok','','','','','',cdsRondKaderdeurDagAf); + ToonPopupScherm('Deze zijn nog niet compleet','Ok','',19,0,0,$001717CD,cdsRondKaderdeurDagAf); end else begin ToonPopupScherm(Response.Header.Omschrijving, 'Probeer opnieuw'); end;