public void S3_QRCode(CustInvoiceJour _custInvoiceJour)
{
Microsoft.Dynamics.QRCode.Encoder qrCodeEncoder;
System.Drawing.Bitmap bm;
System.IO.MemoryStream stream;
S3_E_Inv_Data S3_E_Inv_Data;
container qrcode;
try
{
select S3_E_Inv_Data where S3_E_Inv_Data.InvoiceID == _custInvoiceJour.InvoiceId;
if(S3_E_Inv_Data)
{
qrCodeEncoder = new Microsoft.Dynamics.QRCode.Encoder();
bm = qrCodeEncoder.Encode(S3_E_Inv_Data.SignedQRCode);
stream = new System.IO.MemoryStream();
bm.Save(stream, System.Drawing.Imaging.ImageFormat::get_Png());
QRCode = Binary::constructFromMemoryStream(stream).getContainer();
}
}
catch (Exception::CLRError)
{
throw error(CLRInterop::getLastException().ToString());
}
}
Comments
Post a Comment