Index: VerpakkingsDefinitie/UI/ZoekProductenScherm.pas =================================================================== diff -u -r592 -r593 --- VerpakkingsDefinitie/UI/ZoekProductenScherm.pas (.../ZoekProductenScherm.pas) (revision 592) +++ VerpakkingsDefinitie/UI/ZoekProductenScherm.pas (.../ZoekProductenScherm.pas) (revision 593) @@ -7,7 +7,7 @@ System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.StdCtrls, - Subscherm, Main, + Subscherm, Navigator, ApplicationContext, ProductsAgent; type @@ -74,9 +74,6 @@ procedure TFormZoekProducten.FormCreate(Sender: TObject); begin - // Vorige opzoeking is ongeldig - self.ApplicationContext.ProductsContext.reset(); - // UI configuratie // Zoeken op kort tekst ComboBoxBeperkKortTekst.ItemIndex := 0; // Default value @@ -148,8 +145,8 @@ else raise Exception.Create('Ongeldige waarde geselecteerd'); - FProductsAgent.ZoekOp(ApplicationContext.UserContext, ApplicationContext.ProductsContext, TZoekMethode.KortTekst, - EditZoekKortTekst.text, KlantNummer, LeveranciersNummer, '', ''); + FProductsAgent.ZoekOp(ApplicationContext.UserContext, ApplicationContext.ProductsContext, TZoekMethode.KortTekst, + EditZoekKortTekst.text, KlantNummer, LeveranciersNummer, '', ''); VerwerkOpzoeking(); end; @@ -210,7 +207,10 @@ var ErrorMessage: string; begin - if ApplicationContext.ProductsContext.IsOK = false then + if ApplicationContext.ProductsContext.IsOK then + // Gelukt + Navigator.NavigeerNaar(NAVTOONPRODUCTEN) + else begin // Opzoeking gefaald ErrorMessage := ApplicationContext.ProductsContext.ErrorMessage;