//Read Image from AX to web service AIF .Net
public str GetEmplImage(Description employeeId)
{
str content;
XmlDocument getImageXml(Description _employeeId)
{
XmlDocument xmlEnvelope;
XmlElement childNode;
str contentloc;
HcmWorker worker;
HcmPersonImage PersonImage;
CompanyImage ci;
BinData bin = new BinData();
worker = HcmWorker::findByPersonnelNumber(_employeeId);
select firstOnly PersonImage
where PersonImage.Person == worker.Person;
bin.setData(PersonImage.Image);
contentloc = bin.base64Encode();
xmlEnvelope = new XmlDocument();
childNode = xmlEnvelope.CreateElement("image");
childNode.innerXml(contentloc);
xmlEnvelope.AppendChild(childNode);
return xmlEnvelope;
}
;
content = getImageXml(employeeId).xml();
return content;
}
public str GetEmplImage(Description employeeId)
{
str content;
XmlDocument getImageXml(Description _employeeId)
{
XmlDocument xmlEnvelope;
XmlElement childNode;
str contentloc;
HcmWorker worker;
HcmPersonImage PersonImage;
CompanyImage ci;
BinData bin = new BinData();
worker = HcmWorker::findByPersonnelNumber(_employeeId);
select firstOnly PersonImage
where PersonImage.Person == worker.Person;
bin.setData(PersonImage.Image);
contentloc = bin.base64Encode();
xmlEnvelope = new XmlDocument();
childNode = xmlEnvelope.CreateElement("image");
childNode.innerXml(contentloc);
xmlEnvelope.AppendChild(childNode);
return xmlEnvelope;
}
;
content = getImageXml(employeeId).xml();
return content;
}
No comments:
Post a Comment