correctCodeId function
This function is called when the reference code validated is valid and has not been used.
It sets the value of the control variables ButtonsProvider.wrongCodeId, ButtonsProvider.isCodeValidated and ButtonsProvider.isReadOnly
The only argument is bp, an instance of ButtonsProvider that hosts the control variables
Implementation
void correctCodeId(ButtonsProvider bp){
bp.setWrongCodeid(false);
bp.setIsCodeValidated(true);
bp.setIsReadOnly(true);
}