Index: VerpakkingsDefinitie/UI/ProductDetailScherm.pas =================================================================== diff -u -r564 -r567 --- VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 564) +++ VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 567) @@ -6,12 +6,49 @@ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Subscherm, Main, ApplicationContext, - ObserverPattern; + ObserverPattern, Vcl.ComCtrls; type TFormProductDetail = class(TFormSubscherm) LabelOmschrijving1: TLabel; LabelOmschrijving2: TLabel; + Label1: TLabel; + LabelProductNaam: TLabel; + ListViewDozen: TListView; + GroupBox1: TGroupBox; + ButtonNieuw: TButton; + ButtonVerwijder: TButton; + ButtonMaakDozen: TButton; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + Label10: TLabel; + Label11: TLabel; + Label12: TLabel; + Label13: TLabel; + Label14: TLabel; + Label15: TLabel; + EditMeta: TEdit; + EditVolumeVan: TEdit; + ComboBoxDeelVan: TComboBox; + EditBreedte: TEdit; + EditDiepte: TEdit; + EditHoogte: TEdit; + EditMaxCombAantal: TEdit; + EditAantal: TEdit; + MemoParameters: TMemo; + ComboBoxPlaatsing: TComboBox; + ComboBoxPositie: TComboBox; + ComboBoxRichting: TComboBox; + ComboBoxOptiType: TComboBox; + ComboBoxBoxSelect: TComboBox; + ButtonMeta: TButton; + ButtonDeelVan: TButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private @@ -25,6 +62,7 @@ implementation +uses OptiServerService; {$R *.dfm} Constructor TFormProductDetail.Create(AOwner: TComponent; Navigator: INavigator; ApplicationContext: TApplicationContext; @@ -47,13 +85,51 @@ end; procedure TFormProductDetail.UpdateGui(Sender: TObject); +var + ProductDetailInformatie: OptiServerService.pxBoxData; + begin if ApplicationContext.ProductDetailContext.GeselecteerdProduct <> nil then begin // Update with data from ApplicationContext LabelOmschrijving1.Caption := ApplicationContext.ProductDetailContext.GeselecteerdProduct.Omschrijving1; LabelOmschrijving2.Caption := ApplicationContext.ProductDetailContext.GeselecteerdProduct.Omschrijving2; end; + if ApplicationContext.ProductDetailContext.ProductDetailInformatie <> nil then + begin + ProductDetailInformatie := ApplicationContext.ProductDetailContext.ProductDetailInformatie; + ListViewDozen.Clear(); + With ListViewDozen.Items.Add Do + begin + // List view (grid) + // Caption := IntToStr(Product.ProductNr); // Deze casting geeft geen access violation + Caption := IntToStr(ProductDetailInformatie.CutOrder); + SubItems.Add(ProductDetailInformatie.MetaCaption); + SubItems.Add(ProductDetailInformatie.Breedte + ' x ' + ProductDetailInformatie.Diepte + ' x ' + + ProductDetailInformatie.Hoogte); + SubItems.Add(ProductDetailInformatie.Aantal); + SubItems.Add(ProductDetailInformatie.MaxCombinAantal); + SubItems.Add(ProductDetailInformatie.DeelVanCaption); + // Linkerhelft + { TODO : Defaultwaarden uit DefaultData halen indien gewone waarden niet zijn ingevuld } + EditMeta.Text := ProductDetailInformatie.MetaCaption; + EditVolumeVan.Text := ProductDetailInformatie.VolumeVanCaption; + ComboBoxDeelVan.Items.Add(ProductDetailInformatie.DeelVanCaption); + EditBreedte.Text := ProductDetailInformatie.Breedte; + EditDiepte.Text := ProductDetailInformatie.Diepte; + EditHoogte.Text := ProductDetailInformatie.Hoogte; + EditMaxCombAantal.Text := ProductDetailInformatie.MaxCombinAantal; + EditAantal.Text := ProductDetailInformatie.Aantal; + // Rechterhelft + { TODO : Plaatsing: PPSPrioriteit } + { TODO : Dropdown met check boxes. Positie: Defaultwaarden en veld Positie } + { TODO : + Dropdown met check boxes. + Rotatie heeft default waarden van Richting + X; Y; Z; F; + Veld in XML is Rotatie met 1 waarde } + end; + end; end; end.