Index: VerpakkingsDefinitie/UI/VerpakkingDetailScherm.pas =================================================================== diff -u -r602 -r603 --- VerpakkingsDefinitie/UI/VerpakkingDetailScherm.pas (.../VerpakkingDetailScherm.pas) (revision 602) +++ VerpakkingsDefinitie/UI/VerpakkingDetailScherm.pas (.../VerpakkingDetailScherm.pas) (revision 603) @@ -258,8 +258,8 @@ EditAantal.Text := ProductVerpakking.Aantal; // Plaatsing - LaadEnSelecteerWaardenComboBox(ApplicationContext.UiInstellingenContext.Plaatsing, ComboBoxPlaatsing, - ProductVerpakking.Plaatsing, ProductVerpakking.DefaultPlaatsing, ApplicationContext.UiInstellingenContext.Plaatsing); + LaadEnSelecteerWaardenComboBox(ApplicationContext.UiInstellingenContext.Plaatsingen, ComboBoxPlaatsing, + ProductVerpakking.Plaatsing, ProductVerpakking.DefaultPlaatsing, ApplicationContext.UiInstellingenContext.Plaatsingen); // Positie LaadEnSelecteerWaardenCheckComboBox(ApplicationContext.UiInstellingenContext.Posities, CheckComboBoxPositie, @@ -290,6 +290,8 @@ end; procedure TFormVerpakkingDetail.RegistreerWijzigingenVerpakking(ProductVerpakking: TProductVerpakking); +var + I: Integer; begin // Linkerhelft @@ -312,7 +314,32 @@ // Aantal ProductVerpakking.Aantal := EditAantal.Text; - { TODO : Andere properties opslaan } + // Plaatsing, geslecteerde tekst vertalen naar code en instellen. + ProductVerpakking.Plaatsing := ApplicationContext.UiInstellingenContext.PlaatsingByValue + [ComboBoxPlaatsing.Items[ComboBoxPlaatsing.ItemIndex]]; + + // Positie + ProductVerpakking.Posities.Clear(); + for I := 0 to CheckComboBoxPositie.Items.Count - 1 do + begin + if CheckComboBoxPositie.Checked[I] then + // Checked, registreren + ProductVerpakking.Posities.Add(ApplicationContext.UiInstellingenContext.PositiesByValue[CheckComboBoxPositie.Items[I]]); + end; + + // Richting + ProductVerpakking.Richtingen.Clear(); + for I := 0 to CheckComboBoxRichting.Items.Count - 1 do + begin + if CheckComboBoxRichting.Checked[I] then + // Checked, registreren + ProductVerpakking.Richtingen.Add(ApplicationContext.UiInstellingenContext.RichtingenByValue + [CheckComboBoxRichting.Items[I]]); + end; + + // OptiType, geslecteerde tekst vertalen naar code en instellen. + ProductVerpakking.OptiType := ApplicationContext.UiInstellingenContext.OptiTypesByValue + [ComboBoxOptiType.Items[ComboBoxOptiType.ItemIndex]]; end; procedure TFormVerpakkingDetail.UpdateControlsEnableStatus();