Index: PlanScan/PlanScan.dproj.local =================================================================== diff -u -r370 -r373 --- PlanScan/PlanScan.dproj.local (.../PlanScan.dproj.local) (revision 370) +++ PlanScan/PlanScan.dproj.local (.../PlanScan.dproj.local) (revision 373) @@ -26,13 +26,13 @@ 2020/03/02 09:30:46.000.906,E:\svn\Delphi\PlanScan\WS\GebruikerService.pas= 2020/03/02 09:31:23.000.040,E:\svn\Delphi\PlanScan\WS.pas=E:\svn\Delphi\PlanScan\WS\GebruikerService.pas 2020/03/04 11:43:31.000.229,=E:\svn\Delphi\PlanScan\Unit1.pas - 2020/03/04 11:49:17.000.078,E:\svn\Delphi\PlanScan\Unit1.dfm=E:\svn\Delphi\PlanScan\UI\LoginScherm.dfm 2020/03/04 11:49:17.000.078,E:\svn\Delphi\PlanScan\Unit1.pas=E:\svn\Delphi\PlanScan\UI\LoginScherm.pas + 2020/03/04 11:49:17.000.078,E:\svn\Delphi\PlanScan\Unit1.dfm=E:\svn\Delphi\PlanScan\UI\LoginScherm.dfm 2020/04/20 08:48:05.000.552,=E:\svn\Delphi\PlanScan\Unit1.pas - 2020/04/20 08:48:21.000.787,E:\svn\Delphi\PlanScan\Unit1.pas=E:\svn\Delphi\PlanScan\UI\frmDnaCodes.pas 2020/04/20 08:48:21.000.787,E:\svn\Delphi\PlanScan\Unit1.dfm=E:\svn\Delphi\PlanScan\UI\frmDnaCodes.dfm - 2020/04/20 09:19:59.000.705,E:\svn\Delphi\PlanScan\UI\frmDnaCodes.dfm=E:\svn\Delphi\PlanScan\UI\frameDnaCodes.dfm + 2020/04/20 08:48:21.000.787,E:\svn\Delphi\PlanScan\Unit1.pas=E:\svn\Delphi\PlanScan\UI\frmDnaCodes.pas 2020/04/20 09:19:59.000.705,E:\svn\Delphi\PlanScan\UI\frmDnaCodes.pas=E:\svn\Delphi\PlanScan\UI\frameDnaCodes.pas + 2020/04/20 09:19:59.000.705,E:\svn\Delphi\PlanScan\UI\frmDnaCodes.dfm=E:\svn\Delphi\PlanScan\UI\frameDnaCodes.dfm 2020/04/20 09:21:17.000.241,=E:\svn\Delphi\PlanScan\Unit1.pas 2020/04/20 10:46:18.000.858,=E:\svn\Delphi\PlanScan\Unit1.pas 2020/04/20 10:49:21.000.229,E:\svn\Delphi\PlanScan\Unit1.dfm=E:\svn\Delphi\PlanScan\UI\frameGebruikers.dfm @@ -53,6 +53,9 @@ 2020/05/07 08:38:23.569,=E:\svn\Delphi\PlanScan\WS.pas 2020/05/07 08:38:31.739,E:\svn\Delphi\PlanScan\WS\GebruikerService.pas= 2020/05/07 08:38:57.386,E:\svn\Delphi\PlanScan\WS\GebruikerService.pas=E:\svn\Delphi\PlanScan\WS.pas + 2020/05/07 11:27:31.777,=E:\svn\Delphi\PlanScan\Unit1.pas + 2020/05/07 11:28:03.538,E:\svn\Delphi\PlanScan\UI\KlantinstellingenDetailScherm.pas=E:\svn\Delphi\PlanScan\Unit1.pas + 2020/05/07 11:28:03.538,E:\svn\Delphi\PlanScan\UI\KlantinstellingenDetailScherm.dfm=E:\svn\Delphi\PlanScan\Unit1.dfm @@ -66,6 +69,8 @@ + + Index: PlanScan/PlanScan.dpr =================================================================== diff -u -r370 -r373 --- PlanScan/PlanScan.dpr (.../PlanScan.dpr) (revision 370) +++ PlanScan/PlanScan.dpr (.../PlanScan.dpr) (revision 373) @@ -16,7 +16,8 @@ frameGebruikers in 'UI\frameGebruikers.pas' {frmGebruikers: TFrame}, frameKlantinstellingen in 'UI\frameKlantinstellingen.pas' {frmKlantinstellingen: TFrame}, DnaCodeService in 'WS\DnaCodeService.pas', - GebruikerService in 'WS\GebruikerService.pas'; + GebruikerService in 'WS\GebruikerService.pas', + KlantinstellingenDetailScherm in 'UI\KlantinstellingenDetailScherm.pas' {fmKlantinstellingenDetail}; {$R *.res} @@ -25,5 +26,6 @@ Application.MainFormOnTaskbar := True; Application.CreateForm(TfmMain, fmMain); Application.CreateForm(TfmLogin, fmLogin); + Application.CreateForm(TfmKlantinstellingenDetail, fmKlantinstellingenDetail); Application.Run; end. Index: PlanScan/Main.dfm =================================================================== diff -u -r365 -r373 --- PlanScan/Main.dfm (.../Main.dfm) (revision 365) +++ PlanScan/Main.dfm (.../Main.dfm) (revision 373) @@ -152,7 +152,7 @@ Top = 0 Width = 926 Height = 408 - ActivePage = tsKlantinstellingen + ActivePage = tsDnaCodes Align = alClient TabOrder = 0 object tsDnaCodes: TTabSheet @@ -269,9 +269,6 @@ Height = 398 ExplicitLeft = 799 ExplicitHeight = 408 - inherited btnKlantinstellingenToevoegen: TButton - OnClick = nil - end end end end Index: PlanScan/UI/frameKlantinstellingen.dfm =================================================================== diff -u -r371 -r373 --- PlanScan/UI/frameKlantinstellingen.dfm (.../frameKlantinstellingen.dfm) (revision 371) +++ PlanScan/UI/frameKlantinstellingen.dfm (.../frameKlantinstellingen.dfm) (revision 373) @@ -58,6 +58,7 @@ Height = 25 Caption = 'Toevoegen' TabOrder = 0 + OnClick = btnKlantinstellingenToevoegenClick end object btnKlantinstellingenWijzigen: TButton Left = 6 @@ -66,6 +67,7 @@ Height = 25 Caption = 'Wijzigen' TabOrder = 1 + OnClick = btnKlantinstellingenWijzigenClick end object btnKlantinstellingenVerwijderen: TButton Left = 6 @@ -74,6 +76,7 @@ Height = 25 Caption = 'Verwijderen' TabOrder = 2 + OnClick = btnKlantinstellingenVerwijderenClick end end object cdsKlantinstellingen: TClientDataSet Index: PlanScan/UI/frameKlantinstellingen.pas =================================================================== diff -u -r371 -r373 --- PlanScan/UI/frameKlantinstellingen.pas (.../frameKlantinstellingen.pas) (revision 371) +++ PlanScan/UI/frameKlantinstellingen.pas (.../frameKlantinstellingen.pas) (revision 373) @@ -21,6 +21,9 @@ procedure dbgGebruikersEnter(Sender: TObject); procedure dbgGebruikersColEnter(Sender: TObject); procedure dbgGebruikersColExit(Sender: TObject); + procedure btnKlantinstellingenToevoegenClick(Sender: TObject); + procedure btnKlantinstellingenWijzigenClick(Sender: TObject); + procedure btnKlantinstellingenVerwijderenClick(Sender: TObject); private GridOriginalOptions : TDBGridOptions; procedure VulKlantinstellingenGridMetData(Klantinstellingen: ArrayOfKlantinstellingenKlantinstellingen); @@ -31,7 +34,7 @@ implementation uses - Agent, Main, UiContext; + Agent, Main, UiContext, KlantinstellingenDetailScherm; {$R *.dfm} @@ -53,6 +56,36 @@ end; end; +procedure TfrmKlantinstellingen.btnKlantinstellingenToevoegenClick( + Sender: TObject); +var + fKlantinstellingenDetailScherm: TfmKlantinstellingenDetail; + fBewerkKlantinstellingenResponse: BewerkKlantinstellingenResponse; +begin + fKlantinstellingenDetailScherm := TfmKlantinstellingenDetail.Create(self); + fKlantinstellingenDetailScherm.KlantId := ''; + fKlantinstellingenDetailScherm.IsExport := false; + fKlantinstellingenDetailScherm.ShowModal; + fBewerkKlantinstellingenResponse := TAgent.Create(fmMain.UiContext).BewerkKlantinstellingen('upsert',fKlantinstellingenDetailScherm.KlantId,fKlantinstellingenDetailScherm.IsExport); + if fBewerkKlantinstellingenResponse.Header.Status = '200' then begin + VulKlantinstellingenGridMetData(fBewerkKlantinstellingenResponse.Klantinstellingen); + end else begin + ShowMessage(fBewerkKlantinstellingenResponse.Header.Omschrijving); + end; +end; + +procedure TfrmKlantinstellingen.btnKlantinstellingenVerwijderenClick( + Sender: TObject); +begin + // +end; + +procedure TfrmKlantinstellingen.btnKlantinstellingenWijzigenClick( + Sender: TObject); +begin + // +end; + procedure TfrmKlantinstellingen.dbgGebruikersColEnter(Sender: TObject); begin if Self.dbgGebruikers.SelectedField.DataType = ftBoolean then Index: PlanScan/UI/KlantinstellingenDetailScherm.dfm =================================================================== diff -u -r372 -r373 --- PlanScan/UI/KlantinstellingenDetailScherm.dfm (.../KlantinstellingenDetailScherm.dfm) (revision 372) +++ PlanScan/UI/KlantinstellingenDetailScherm.dfm (.../KlantinstellingenDetailScherm.dfm) (revision 373) @@ -53,7 +53,6 @@ Font.Style = [] ParentFont = False TabOrder = 0 - Text = 'edtklantId' end object cbIsExport: TCheckBox Left = 167 Index: PlanScan/PlanScan.dproj =================================================================== diff -u -r370 -r373 --- PlanScan/PlanScan.dproj (.../PlanScan.dproj) (revision 370) +++ PlanScan/PlanScan.dproj (.../PlanScan.dproj) (revision 373) @@ -111,6 +111,10 @@ + +
fmKlantinstellingenDetail
+ dfm +
Cfg_2 Index: PlanScan/UI/KlantinstellingenDetailScherm.pas =================================================================== diff -u -r372 -r373 --- PlanScan/UI/KlantinstellingenDetailScherm.pas (.../KlantinstellingenDetailScherm.pas) (revision 372) +++ PlanScan/UI/KlantinstellingenDetailScherm.pas (.../KlantinstellingenDetailScherm.pas) (revision 373) @@ -13,9 +13,14 @@ edtklantId: TEdit; cbIsExport: TCheckBox; private + function getIsExport: boolean; + function getKlantId: string; + procedure setIsExport(const Value: boolean); + procedure setKlantId(const Value: string); { Private declarations } public - { Public declarations } + property KlantId: string read getKlantId write setKlantId; + property IsExport: boolean read getIsExport write setIsExport; end; var @@ -25,4 +30,26 @@ {$R *.dfm} +{ TfmKlantinstellingenDetail } + +function TfmKlantinstellingenDetail.getIsExport: boolean; +begin + result := cbIsExport.Checked; +end; + +function TfmKlantinstellingenDetail.getKlantId: string; +begin + result := edtKlantId.Text; +end; + +procedure TfmKlantinstellingenDetail.setIsExport(const Value: boolean); +begin + cbIsExport.Checked := Value; +end; + +procedure TfmKlantinstellingenDetail.setKlantId(const Value: string); +begin + edtKlantId.Text := Value; +end; + end.