Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u -r556 -r560 --- VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 556) +++ VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 560) @@ -8,7 +8,8 @@ interface uses - ObserverPattern; + ObserverPattern, + System.Generics.Collections; // SUB CONTEXTS: klassen die overeenkomen met bepaalde sub-context (bv. alles gerelateerd met authenticatie). @@ -31,17 +32,35 @@ property InternalErrorMessage: string read FInternalErrorMessage write FInternalErrorMessage; end; + TProductInformatie = class + private + FProductNr: Integer; + FTekst: string; + FKol1: string; + FKol2: string; + FKol3: string; + FKol4: string; + public + property ProductNr: Integer read FProductNr write FProductNr; + property Tekst: string read FTekst write FTekst; + property Kol1: string read FKol1 write FKol1; + property Kol2: string read FKol2 write FKol2; + property Kol3: string read FKol3 write FKol3; + property Kol4: string read FKol4 write FKol4; + end; + TProductsContext = class(TSubject) private FSessionKey: string; - FDataSet: TObject; + FProducten: TList; FIsOK: Boolean; FErrorMessage: string; FInternalErrorMessage: string; public + constructor Create(); procedure NotifyChanged(); - property DataSet: TObject read FDataSet write FDataSet; + property Producten: TList read FProducten write FProducten; property IsOK: Boolean read FIsOK write FIsOK; property ErrorMessage: string read FErrorMessage write FErrorMessage; @@ -67,6 +86,12 @@ self.Change(); end; +constructor TProductsContext.Create(); +begin + inherited Create(); + FProducten := TList.Create(); +end; + procedure TProductsContext.NotifyChanged(); begin self.Change();