Index: VerpakkingsDefinitie/UI/ProductDetailScherm.dfm =================================================================== diff -u -r567 -r568 --- VerpakkingsDefinitie/UI/ProductDetailScherm.dfm (.../ProductDetailScherm.dfm) (revision 567) +++ VerpakkingsDefinitie/UI/ProductDetailScherm.dfm (.../ProductDetailScherm.dfm) (revision 568) @@ -208,8 +208,6 @@ end> TabOrder = 0 ViewStyle = vsReport - ExplicitWidth = 718 - ExplicitHeight = 147 end object ButtonNieuw: TButton Left = 688 @@ -219,8 +217,6 @@ Anchors = [akRight, akBottom] Caption = 'Nieuw' TabOrder = 1 - ExplicitLeft = 803 - ExplicitTop = 40 end object ButtonVerwijder: TButton Left = 688 @@ -230,8 +226,6 @@ Anchors = [akRight, akBottom] Caption = 'Verwijder' TabOrder = 2 - ExplicitLeft = 803 - ExplicitTop = 79 end object ButtonMaakDozen: TButton Left = 688 @@ -241,8 +235,6 @@ Anchors = [akRight, akBottom] Caption = 'Maak dozen' TabOrder = 3 - ExplicitLeft = 803 - ExplicitTop = 133 end end object EditMeta: TEdit @@ -251,6 +243,7 @@ Width = 154 Height = 21 Anchors = [akLeft, akBottom] + Enabled = False TabOrder = 1 end object EditVolumeVan: TEdit @@ -259,6 +252,7 @@ Width = 154 Height = 21 Anchors = [akLeft, akBottom] + Enabled = False TabOrder = 2 end object ComboBoxDeelVan: TComboBox @@ -309,55 +303,45 @@ Anchors = [akLeft, akBottom] TabOrder = 8 end - object MemoParameters: TMemo - Left = 112 - Top = 541 - Width = 200 - Height = 124 - Anchors = [akLeft, akBottom] - Lines.Strings = ( - 'MemoParameters') - TabOrder = 9 - end object ComboBoxPlaatsing: TComboBox Left = 503 Top = 277 Width = 162 Height = 21 Anchors = [akLeft, akBottom] - TabOrder = 10 + TabOrder = 9 end object ComboBoxPositie: TComboBox Left = 503 Top = 309 Width = 162 Height = 21 Anchors = [akLeft, akBottom] - TabOrder = 11 + TabOrder = 10 end object ComboBoxRichting: TComboBox Left = 503 Top = 341 Width = 162 Height = 21 Anchors = [akLeft, akBottom] - TabOrder = 12 + TabOrder = 11 end object ComboBoxOptiType: TComboBox Left = 503 Top = 405 Width = 162 Height = 21 Anchors = [akLeft, akBottom] - TabOrder = 13 + TabOrder = 12 end object ComboBoxBoxSelect: TComboBox Left = 503 Top = 437 Width = 162 Height = 21 Anchors = [akLeft, akBottom] - TabOrder = 14 + TabOrder = 13 end object ButtonMeta: TButton Left = 272 @@ -366,7 +350,7 @@ Height = 21 Anchors = [akLeft, akBottom] Caption = '...' - TabOrder = 15 + TabOrder = 14 end object ButtonDeelVan: TButton Left = 272 @@ -375,6 +359,24 @@ Height = 21 Anchors = [akLeft, akBottom] Caption = '...' + TabOrder = 15 + end + object CheckListBox1: TCheckListBox + Left = 503 + Top = 464 + Width = 121 + Height = 97 + ItemHeight = 13 TabOrder = 16 end + object MemoParameters: TMemo + Left = 112 + Top = 544 + Width = 200 + Height = 125 + Anchors = [akLeft, akBottom] + Lines.Strings = ( + '') + TabOrder = 17 + end end Index: VerpakkingsDefinitie/UI/ProductDetailScherm.pas =================================================================== diff -u -r567 -r568 --- VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 567) +++ VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 568) @@ -6,7 +6,7 @@ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Subscherm, Main, ApplicationContext, - ObserverPattern, Vcl.ComCtrls; + ObserverPattern, Vcl.ComCtrls, Vcl.CheckLst; type TFormProductDetail = class(TFormSubscherm) @@ -41,14 +41,15 @@ EditHoogte: TEdit; EditMaxCombAantal: TEdit; EditAantal: TEdit; - MemoParameters: TMemo; ComboBoxPlaatsing: TComboBox; ComboBoxPositie: TComboBox; ComboBoxRichting: TComboBox; ComboBoxOptiType: TComboBox; ComboBoxBoxSelect: TComboBox; ButtonMeta: TButton; ButtonDeelVan: TButton; + CheckListBox1: TCheckListBox; + MemoParameters: TMemo; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private @@ -87,7 +88,7 @@ procedure TFormProductDetail.UpdateGui(Sender: TObject); var ProductDetailInformatie: OptiServerService.pxBoxData; - + PPSPrioriteitEl: OptiServerService.pxemPPSPrioriteit; begin if ApplicationContext.ProductDetailContext.GeselecteerdProduct <> nil then begin @@ -111,23 +112,42 @@ 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; + if ProductDetailInformatie.Breedte <> '' then + EditBreedte.Text := ProductDetailInformatie.Breedte + else + EditBreedte.Text := ProductDetailInformatie.DefaultData.Breedte; // Default + if ProductDetailInformatie.Diepte <> '' then + EditDiepte.Text := ProductDetailInformatie.Diepte + else + EditDiepte.Text := ProductDetailInformatie.DefaultData.Diepte; // Default + if ProductDetailInformatie.Hoogte <> '' then + EditHoogte.Text := ProductDetailInformatie.Hoogte + else + EditHoogte.Text := ProductDetailInformatie.DefaultData.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 } + + // Plaatsing + for PPSPrioriteitEl in ProductDetailInformatie.PPSPrioriteit do + begin + ComboBoxPlaatsing.Items.Add(PPSPrioriteitEl.Key); + end; + // Combobox vullen en item selecteren. Indien item niet aanwezig is, eerste item selecteren. + if ComboBoxPlaatsing.Items.IndexOf(ProductDetailInformatie.OptiType) >= 0 then + ComboBoxPlaatsing.ItemIndex := ComboBoxPlaatsing.Items.IndexOf(ProductDetailInformatie.OptiType) + else if ComboBoxPlaatsing.Items.Count > 0 then + ComboBoxPlaatsing.ItemIndex := 0; + + { 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;