
I have been trying to resolve this issue but I have stuck at a place and need some help.
int getEnumValue(FormComboBoxControl _comboBox)
{
SysDictEnum enum = new SysDictEnum(_comboBox.enumType());
return enum.name2Value(_comboBox.getText(_comboBox.selection()));
}
ecoResProductMaster = ecoResProduct as EcoResProductMaster;
ecoResProductMaster.VariantConfigurationTechnology = getEnumValue(VariantConfigurationTechnology);
The issue is in the line ecoResProductMaster.VariantConfigurationTechnology = getEnumValue(VariantConfigurationTechnology); It is assigning an int value to the field which is of enum type. That is because the return type of getEnumValue function is int. But I can't alter this value as it is used like this for some more methods. Please help me out.
Try
ecoResProductMaster.VariantConfigurationTechnology = any2enum(getEnumValue(VariantConfigurationTechnology));