public void docHandlingAddNotes(notes _notes='testNotes',RefTableId objRefTableId,RefRecId objRefRecId,Description strDescription='',str strDateAreId)
{
docuref docuref;
form form2;
filename file, docuFilename;
recid docuvaluerecid;
docuvalue docuvalue;
int hwnd;//wfs ctodd 6/21/2012
docutype docutype;
DocuActionArchive archive;
System.IO.FileInfo fileInfo;
int size;
Filename onlyFilename;
Filename curFileType;
;
if(_notes)
{
ttsbegin;
docuref.TypeId = "Note";
docuref.Name = strDescription;
docuref.Notes = _notes;
docuRef.Restriction = DocuRestriction::External;
docuref.RefCompanyId = strDateAreId;
docuref.RefTableId = objRefTableId;
docuref.RefRecId = objRefRecId;
docuref.insert();
/* docuvalue.initValue();
docuvalue.insert();
docuref.ValueRecId = docuvalue.RecId;
docuref.update();
docuvaluerecid = docuvalue.RecId;
*/
//select forupdate docuvalue where docuvalue.recid == docuvaluerecid;
//docuvalue = docuvalue::writeDocuValue(docuref,file);
/*fileInfo = new System.IO.FileInfo(file);
size = fileInfo.get_Length();
info(strfmt("%1",size));*/
//archive = new DocuActionArchive();
//archive.add(docuRef, file);
/*
docutype = docutype::find(docuref.TypeId);
numSeq = NumberSeq::newGetNum(DocuParameters::numRefDocuNumber(),true);
[onlyFilename,curFileType] = Docu::splitFilename(file);
if(docuType.filePlace == DocuFilePlace::Archive)
{
docuFilename = docuRef.path()
+ smmDocuments::getNonExistingFileName(numSeq,docuRef.path(),curFileType)
+ '.'
+ curFileType; //new Filename
//uses curFileType
WinAPI::copyFile(filename, docuFilename);
}
else
{
docuFilename = filename;
}
this.insertDocuValue(docuRef,docuFilename);*/
ttscommit;
}
}
Using the above method
------------------------
//adding notes
AIF_DOCHandCustomService_add.docHandlingAddNotes("Testing data......",8152,5637144709,"Testing data","ceu");
{
docuref docuref;
form form2;
filename file, docuFilename;
recid docuvaluerecid;
docuvalue docuvalue;
int hwnd;//wfs ctodd 6/21/2012
docutype docutype;
DocuActionArchive archive;
System.IO.FileInfo fileInfo;
int size;
Filename onlyFilename;
Filename curFileType;
;
if(_notes)
{
ttsbegin;
docuref.TypeId = "Note";
docuref.Name = strDescription;
docuref.Notes = _notes;
docuRef.Restriction = DocuRestriction::External;
docuref.RefCompanyId = strDateAreId;
docuref.RefTableId = objRefTableId;
docuref.RefRecId = objRefRecId;
docuref.insert();
/* docuvalue.initValue();
docuvalue.insert();
docuref.ValueRecId = docuvalue.RecId;
docuref.update();
docuvaluerecid = docuvalue.RecId;
*/
//select forupdate docuvalue where docuvalue.recid == docuvaluerecid;
//docuvalue = docuvalue::writeDocuValue(docuref,file);
/*fileInfo = new System.IO.FileInfo(file);
size = fileInfo.get_Length();
info(strfmt("%1",size));*/
//archive = new DocuActionArchive();
//archive.add(docuRef, file);
/*
docutype = docutype::find(docuref.TypeId);
numSeq = NumberSeq::newGetNum(DocuParameters::numRefDocuNumber(),true);
[onlyFilename,curFileType] = Docu::splitFilename(file);
if(docuType.filePlace == DocuFilePlace::Archive)
{
docuFilename = docuRef.path()
+ smmDocuments::getNonExistingFileName(numSeq,docuRef.path(),curFileType)
+ '.'
+ curFileType; //new Filename
//uses curFileType
WinAPI::copyFile(filename, docuFilename);
}
else
{
docuFilename = filename;
}
this.insertDocuValue(docuRef,docuFilename);*/
ttscommit;
}
}
Using the above method
------------------------
//adding notes
AIF_DOCHandCustomService_add.docHandlingAddNotes("Testing data......",8152,5637144709,"Testing data","ceu");
No comments:
Post a Comment