Index: VerpakkingsDefinitie/UI/ProductDetailScherm.dfm =================================================================== diff -u -r587 -r590 --- VerpakkingsDefinitie/UI/ProductDetailScherm.dfm (.../ProductDetailScherm.dfm) (revision 587) +++ VerpakkingsDefinitie/UI/ProductDetailScherm.dfm (.../ProductDetailScherm.dfm) (revision 590) @@ -90,8 +90,8 @@ ExplicitLeft = 676 end object PanelVerpakkingControls: TPanel - Left = 8 - Top = 257 + Left = 2 + Top = 259 Width = 792 Height = 416 TabOrder = 1 @@ -186,13 +186,6 @@ Height = 13 Caption = 'OptiType' end - object Label15: TLabel - Left = 360 - Top = 237 - Width = 47 - Height = 13 - Caption = 'BoxSelect' - end object ButtonMeta: TButton Left = 272 Top = 12 @@ -276,44 +269,28 @@ Enabled = False TabOrder = 10 end - object Button1: TButton - Left = 272 - Top = 44 - Width = 40 - Height = 21 - Caption = '...' - TabOrder = 11 - end object EditVolumeVan: TEdit Left = 112 Top = 44 Width = 154 Height = 21 Enabled = False - TabOrder = 12 + TabOrder = 11 end object ComboBoxOptiType: TComboBox Left = 464 Top = 204 Width = 162 Height = 21 Style = csDropDownList - TabOrder = 13 + TabOrder = 12 end - object ComboBoxBoxSelect: TComboBox - Left = 464 - Top = 236 - Width = 162 - Height = 21 - Style = csDropDownList - TabOrder = 14 - end object ScrollBoxParameters: TScrollBox Left = 112 Top = 268 - Width = 295 + Width = 200 Height = 125 - TabOrder = 15 + TabOrder = 13 end end object GroupBox1: TGroupBox Index: VerpakkingsDefinitie/UI/CustomPanelVerpakkingParameter.pas =================================================================== diff -u -r587 -r590 --- VerpakkingsDefinitie/UI/CustomPanelVerpakkingParameter.pas (.../CustomPanelVerpakkingParameter.pas) (revision 587) +++ VerpakkingsDefinitie/UI/CustomPanelVerpakkingParameter.pas (.../CustomPanelVerpakkingParameter.pas) (revision 590) @@ -42,9 +42,10 @@ procedure TCustomPanelVerpakkingParameter.SetProductVerpakkingParameter(Parameter: TProductVerpakkingParameter); begin CreateControls(); - FLabelControl.Caption := Parameter.ToolTip; + FLabelControl.Caption := Parameter.ProgLabel; FEditControl.TextHint := Parameter.DefaultWaarde; FEditControl.Text := Parameter.Waarde; + FEditControl.Hint := Parameter.ToolTip; end; procedure TCustomPanelVerpakkingParameter.CreateControls(); Index: VerpakkingsDefinitie/UI/ProductDetailScherm.pas =================================================================== diff -u -r589 -r590 --- VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 589) +++ VerpakkingsDefinitie/UI/ProductDetailScherm.pas (.../ProductDetailScherm.pas) (revision 590) @@ -48,12 +48,9 @@ ButtonMeta: TButton; PanelVerpakkingControls: TPanel; Label3: TLabel; - Button1: TButton; EditVolumeVan: TEdit; Label14: TLabel; - Label15: TLabel; ComboBoxOptiType: TComboBox; - ComboBoxBoxSelect: TComboBox; LabelProductNummer: TLabel; Label17: TLabel; ScrollBoxParameters: TScrollBox; @@ -193,6 +190,8 @@ // Linkerhelft EditMeta.Text := ProductVerpakking.MetaCaptionDisplay; + EditVolumeVan.Text := ProductVerpakking.VolumeVanCaption; + // DeelVan ComboBoxDeelVan.Items.Clear(); // ComboBox vullen en item selecteren. @@ -252,6 +251,10 @@ // Richting LaadEnSelecteerWaardenCheckComboBox(ApplicationContext.UiInstellingenContext.Richtingen, CheckComboBoxRichting, ProductVerpakking.Richtingen, ProductVerpakking.DefaultRichtingen, ApplicationContext.UiInstellingenContext.Richtingen); + + // OptiType + LaadEnSelecteerWaardenComboBox(ApplicationContext.UiInstellingenContext.OptiTypes, ComboBoxOptiType, ProductVerpakking.OptiType, + ProductVerpakking.DefaultOptiType, ApplicationContext.UiInstellingenContext.OptiTypes); end; procedure TFormProductDetail.LaadEnSelecteerWaardenComboBox(Waarden: TDictionary; ComboBox: TComboBox; Index: VerpakkingsDefinitie/WS/ProductsAgent.pas =================================================================== diff -u -r587 -r590 --- VerpakkingsDefinitie/WS/ProductsAgent.pas (.../ProductsAgent.pas) (revision 587) +++ VerpakkingsDefinitie/WS/ProductsAgent.pas (.../ProductsAgent.pas) (revision 590) @@ -124,6 +124,7 @@ UiInstellingenContext.InternalErrorMessage := ''; UiInstellingenContext.Posities.Clear(); + UiInstellingenContext.PositiesByValue.Clear(); if Instellingen.Positie <> nil then begin for I := 0 to Instellingen.Positie.Count - 1 do @@ -136,6 +137,7 @@ end; UiInstellingenContext.Plaatsing.Clear(); + UiInstellingenContext.PlaatsingByValue.Clear(); if Instellingen.Plaatsing <> nil then begin for I := 0 to Instellingen.Plaatsing.Count - 1 do @@ -148,6 +150,7 @@ end; UiInstellingenContext.Richtingen.Clear(); + UiInstellingenContext.RichtingenByValue.Clear(); if Instellingen.Richting <> nil then begin for I := 0 to Instellingen.Richting.Count - 1 do @@ -159,6 +162,19 @@ end; end; + UiInstellingenContext.OptiTypes.Clear(); + UiInstellingenContext.OptiTypesByValue.Clear(); + if Instellingen.Richting <> nil then + begin + for I := 0 to Instellingen.OptiType.Count - 1 do + begin + Node := Instellingen.OptiType[I]; + KeyStr := Node.GetAttributeNS('Key', ''); + UiInstellingenContext.OptiTypes.Add(KeyStr, Node.Text); + UiInstellingenContext.OptiTypesByValue.Add(Node.Text, KeyStr); + end; + end; + UiInstellingenContext.NotifyChanged(); end; @@ -468,36 +484,45 @@ with Verpakking do begin RawData := pxBoxDataObj; + VolumeVanCaption := pxBoxDataObj.VolumeVanCaption; ID := pxBoxDataObj.ID; CutOrder := pxBoxDataObj.CutOrder; Breedte := pxBoxDataObj.Breedte; - DefaultBreedte := pxBoxDataObj.DefaultData.Breedte; Diepte := pxBoxDataObj.Diepte; - DefaultDiepte := pxBoxDataObj.DefaultData.Diepte; Hoogte := pxBoxDataObj.Hoogte; - DefaultHoogte := pxBoxDataObj.DefaultData.Hoogte; Aantal := pxBoxDataObj.Aantal; MaxCombinAantal := pxBoxDataObj.MaxCombinAantal; Plaatsing := pxBoxDataObj.Plaatsing; + OptiType := pxBoxDataObj.OptiType; Posities.AddRange(SplitString(pxBoxDataObj.Positie, '')); - DefaultPosities.AddRange(SplitString(pxBoxDataObj.DefaultData.Positie, ';')); Richtingen.AddRange(SplitString(pxBoxDataObj.Rotatie, '')); - DefaultRichtingen.AddRange(SplitString(pxBoxDataObj.DefaultData.Rotatie, ';')); + if pxBoxDataObj.DefaultData <> nil then + begin + DefaultBreedte := pxBoxDataObj.DefaultData.Breedte; + DefaultDiepte := pxBoxDataObj.DefaultData.Diepte; + DefaultHoogte := pxBoxDataObj.DefaultData.Hoogte; + DefaultPlaatsing := pxBoxDataObj.DefaultData.Plaatsing; + DefaultOptiType := pxBoxDataObj.DefaultData.OptiType; + + DefaultPosities.AddRange(SplitString(pxBoxDataObj.DefaultData.Positie, ';')); + DefaultRichtingen.AddRange(SplitString(pxBoxDataObj.DefaultData.Rotatie, ';')); + end; + // Verpakking parameters. haal waarden uit gewone data en default data. Parameters.Clear(); - if (High(pxBoxDataObj.Params) = High(pxBoxDataObj.DefaultData.Params)) then - for I := 0 to High(pxBoxDataObj.Params) do - begin - NieuweVerpakkingParameter := TProductVerpakkingParameter.Create(); - NieuweVerpakkingParameter.ID := pxBoxDataObj.Params[I].ID; - NieuweVerpakkingParameter.ProgLabel := pxBoxDataObj.Params[I].ProgLabel; - NieuweVerpakkingParameter.ToolTip := pxBoxDataObj.Params[I].ToolTip; - NieuweVerpakkingParameter.Waarde := pxBoxDataObj.Params[I].Waarde; + for I := 0 to High(pxBoxDataObj.Params) do + begin + NieuweVerpakkingParameter := TProductVerpakkingParameter.Create(); + NieuweVerpakkingParameter.ID := pxBoxDataObj.Params[I].ID; + NieuweVerpakkingParameter.ProgLabel := pxBoxDataObj.Params[I].ProgLabel; + NieuweVerpakkingParameter.ToolTip := pxBoxDataObj.Params[I].ToolTip; + NieuweVerpakkingParameter.Waarde := pxBoxDataObj.Params[I].Waarde; + if (pxBoxDataObj.DefaultData <> nil) and (High(pxBoxDataObj.Params) = High(pxBoxDataObj.DefaultData.Params)) then NieuweVerpakkingParameter.DefaultWaarde := pxBoxDataObj.DefaultData.Params[I].Waarde; - Parameters.Add(NieuweVerpakkingParameter); - end; + Parameters.Add(NieuweVerpakkingParameter); + end; DeelVanID := pxBoxDataObj.DeelVanID; DeelVanCaption := pxBoxDataObj.DeelVanCaption; Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u -r587 -r590 --- VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 587) +++ VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 590) @@ -40,6 +40,8 @@ FPlaatsingByValue: TDictionary; FRichtingByKey: TDictionary; FRichtingByValue: TDictionary; + FOptiTypeByKey: TDictionary; + FOptiTypeByValue: TDictionary; FIsOK: Boolean; FErrorMessage: string; @@ -53,6 +55,8 @@ property PlaatsingByValue: TDictionary read FPlaatsingByValue; property Richtingen: TDictionary read FRichtingByKey; property RichtingenByValue: TDictionary read FRichtingByValue; + property OptiTypes: TDictionary read FOptiTypeByKey; + property OptiTypesByValue: TDictionary read FOptiTypeByValue; property IsOK: Boolean read FIsOK write FIsOK; property ErrorMessage: string read FErrorMessage write FErrorMessage; @@ -123,18 +127,19 @@ FID: string; FCutOrder: Integer; + FVolumeVanCaption: string; FBreedte: string; FDefaultBreedte: string; FDiepte: string; FDefaultDiepte: string; FHoogte: string; FDefaultHoogte: string; FAantal: string; - FDefaultAantal: string; FMaxCombinAantal: string; - FDefaultMaxCombinAantal: string; FPlaatsing: string; FDefaultPlaatsing: string; + FOptiType: string; + FDefaultOptiType: string; FPosities: TList; FDefaultPosities: TList; @@ -156,18 +161,20 @@ property ID: string read FID write FID; property CutOrder: Integer read FCutOrder write FCutOrder; + property VolumeVanCaption: string read FVolumeVanCaption write FVolumeVanCaption; property Breedte: string read FBreedte write FBreedte; property DefaultBreedte: string read FDefaultBreedte write FDefaultBreedte; property Diepte: string read FDiepte write FDiepte; property DefaultDiepte: string read FDefaultDiepte write FDefaultDiepte; property Hoogte: string read FHoogte write FHoogte; property DefaultHoogte: string read FDefaultHoogte write FDefaultHoogte; property Aantal: string read FAantal write FAantal; - property DefaultAantal: string read FDefaultAantal write FDefaultAantal; property MaxCombinAantal: string read FMaxCombinAantal write FMaxCombinAantal; - property DefaultMaxCombinAantal: string read FDefaultMaxCombinAantal write FDefaultMaxCombinAantal; property Plaatsing: string read FPlaatsing write FPlaatsing; property DefaultPlaatsing: string read FDefaultPlaatsing write FDefaultPlaatsing; + property OptiType: string read FOptiType write FOptiType; + property DefaultOptiType: string read FDefaultOptiType write FDefaultOptiType; + property Posities: TList read FPosities; property DefaultPosities: TList read FDefaultPosities; property Richtingen: TList read FRichtingen; @@ -241,6 +248,8 @@ FPlaatsingByValue := TDictionary.Create(); FRichtingByKey := TDictionary.Create(); FRichtingByValue := TDictionary.Create(); + FOptiTypeByKey := TDictionary.Create(); + FOptiTypeByValue := TDictionary.Create(); end; procedure TUiInstellingenContext.NotifyChanged();