static
void
addDoc( Common common,
DocuTypeId docuTypeId,
FileName fileName)
{
DocuRef docuRef;
DocuValue docuValue;
if
(common && docuTypeId)
{
ttsBegin;
docuRef.clear();
docuRef.initValue();
docuRef.TypeId = docuTypeId;
docuRef.Name = filename;
docuRef.RefRecId = common.RecId;
docuRef.RefTableId = common.TableId;
docuRef.RefCompanyId = curext();
docuValue.initFromDocuRef(docuRef);
docuValue.insert();
docuRef.ValueRecId = docuValue.RecId;
docuRef.insert();
ttsCommit;
if
(filename)
{
DocuValue::writeDocuValue(docuRef,filename);
}
}
}
No comments:
Post a Comment