[ExtensionOf(classStr(SrsPrintDestinationSettings))]
final class SrsPrintDestinationSettings_DDD_Extension
{
public SysEmailId DDDEmailId;
public FileName DDDFileName;
#define.CurrentVersion(2)
#localmacro.CurrentList
DDDEmailId,
DDDFileName
#endmacro
public str parmDDDEmailId(str _DDDEmailId = DDDEmailId)
{
DDDEmailId = _DDDEmailId;
return DDDEmailId;
}
public str parmDDDFileName(str _DDDFileName = DDDFileName)
{
DDDFileName = _DDDFileName;
return DDDFileName;
}
public SrsReportEMailDataContract parmEMailContract(SrsReportEMailDataContract _emailContract)
{
SrsReportEMailDataContract emailContract = next parmEMailContract(_emailContract);
if (emailContract && this.parmDDDEmailId())
{
SysEmailTable emailTable = SysEmailTable::find(this.parmDDDEmailId());
SysEmailMessageTable messageTable = SysEmailMessageTable::find(this.parmDDDEmailId(), SystemParameters::systemLanguageId());
if (emailTable.SenderAddr)
{
emailContract.parmDDDFromAddress(emailTable.SenderAddr);
}
if (messageTable)
{
emailContract.parmBody(messageTable.Mail);
}
}
return emailContract;
}
public str parmFileName(str _fileName)
{
FileName fileName = next parmFileName(_fileName);
if (!_fileName && this.parmDDDFileName())
{
fileName = this.parmDDDFileName();
}
return fileName;
}
public container pack()
{
container packedClass = next pack();
return SysPackExtensions::appendExtension(packedClass, classStr(SrsPrintDestinationSettings_DDD_Extension), this.DDDPack());
}
public boolean unpack(container _packedClass)
{
boolean result = next unpack(_packedClass);
if (result)
{
container con = SysPackExtensions::findExtension(_packedClass, classStr(SrsPrintDestinationSettings_DDD_Extension));
//Also unpack the extension
if (!this.DDDUnpack(con))
{
result = false;
}
}
return result;
}
private container DDDPack()
{
return [#CurrentVersion, #CurrentList];
}
private boolean DDDUnpack(container packedClass)
{
Integer version = RunBase::getVersion(packedClass);
switch (version)
{
case #CurrentVersion:
[version, #currentList] = packedClass;
break;
default:
return false;
}
return true;
}
}
-----------------------------------------------*****----------------------------------------
No comments:
Post a Comment