static void insertimage(Args _args)
{
DocuActionArchive docuActionArchive;
EcoResProductImageManagement productImageManagement;
EcoResProductImageThumbnail ecoResProductImageThumbnail;
DocuRef docuRef;
DocuValue docuValue;
EcoResProductImage ecoResProductImage;
InventTable inventTable;
// Specify the display product number
InventTable = InventTable::find("M0011");
ttsBegin;
docuRef.TypeId = "File";
docuRef.RefTableId = inventTable.TableId;
docuRef.RefRecId = InventTable.RecId;
docuRef.RefCompanyId = inventTable.dataAreaId;
docuRef.ActualCompanyId = curext();
docuRef.insert();
docuActionArchive = DocuAction::newDocuRef(docuRef);
docuActionArchive.add(docuRef,"C:\\Users\\rajendra.c\\Desktop\\Audi-A1.jpg");
ecoResProductImage.RefRecId = docuRef.RecId;
ecoResProductImage.RefRecord = docuRef.RefRecId;
ecoResProductImage.ImageFormat = 'jpg';
ecoResProductImage.FileName = "Audi-A1.jpg";
ecoResProductImage.Usage = EcoResProductImageUsage::External;
ecoResProductImageThumbnail = new EcoResProductImageThumbnail(false);
ecoResProductImage.MediumSize = ecoResProductImageThumbnail.generateThumbnail(204,204,docuRef);
ecoResProductImage.ThumbnailSize = ecoResProductImageThumbnail.generateThumbnail(48,48,docuRef);
if (ecoResProductImage.MediumSize == connull())
{
info("@SYS301935");
}
if (ecoResProductImage.ThumbnailSize == connull())
{
info("@SYS301936");
}
ecoResProductImage.insert();
ttsCommit;
}
{
DocuActionArchive docuActionArchive;
EcoResProductImageManagement productImageManagement;
EcoResProductImageThumbnail ecoResProductImageThumbnail;
DocuRef docuRef;
DocuValue docuValue;
EcoResProductImage ecoResProductImage;
InventTable inventTable;
// Specify the display product number
InventTable = InventTable::find("M0011");
ttsBegin;
docuRef.TypeId = "File";
docuRef.RefTableId = inventTable.TableId;
docuRef.RefRecId = InventTable.RecId;
docuRef.RefCompanyId = inventTable.dataAreaId;
docuRef.ActualCompanyId = curext();
docuRef.insert();
docuActionArchive = DocuAction::newDocuRef(docuRef);
docuActionArchive.add(docuRef,"C:\\Users\\rajendra.c\\Desktop\\Audi-A1.jpg");
ecoResProductImage.RefRecId = docuRef.RecId;
ecoResProductImage.RefRecord = docuRef.RefRecId;
ecoResProductImage.ImageFormat = 'jpg';
ecoResProductImage.FileName = "Audi-A1.jpg";
ecoResProductImage.Usage = EcoResProductImageUsage::External;
ecoResProductImageThumbnail = new EcoResProductImageThumbnail(false);
ecoResProductImage.MediumSize = ecoResProductImageThumbnail.generateThumbnail(204,204,docuRef);
ecoResProductImage.ThumbnailSize = ecoResProductImageThumbnail.generateThumbnail(48,48,docuRef);
if (ecoResProductImage.MediumSize == connull())
{
info("@SYS301935");
}
if (ecoResProductImage.ThumbnailSize == connull())
{
info("@SYS301936");
}
ecoResProductImage.insert();
ttsCommit;
}