static boolean clearValueOfField(
Common _record,
FieldID _fieldID)
{
DictField dictField;
;
dictField = new DictField(_record.TableId, _fieldID);
if (!dictField)
return false;
switch (dictField.baseType())
{
case Types::String :
case Types::VarString :
_record.(_fieldID) = "";
return true;
case Types::Date :
_record.(_fieldID) = datenull();
return true;
case Types::Real :
case Types::Integer :
case Types::Enum :
_record.(_fieldID) = 0;
return true;
default :
return false;
}
return false;
}
Tuesday, August 27, 2019
helper class to clear the value of a table field
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment