old phase zatca QR code

  //private void fillByteArrayQRData(int _tag, int _length, System.Byte[] _byteArrStr)

 //{

 //    int i;


 //    byteArray.set_Item(CurarrIndex, System.Convert::ToByte(_tag));

 //    CurarrIndex++;

 //    byteArray.set_Item(CurarrIndex, System.Convert::ToByte(_length));

 //    CurarrIndex++;

 //    for (i = 0; i < CLRInterop::getAnyTypeForObject(_byteArrStr.get_Length()); i++)

 //    {

 //        byteArray.set_Item(CurarrIndex, _byteArrStr.get_Item(i));

 //        CurarrIndex++;

 //    }

 //}


 //display container qrcode( CustInvoiceJour _custInvoiceJour)

 //{

 //    Bindata bindata = new Bindata();

 //    Filename                filename;

 //    container               con;

 //    int                     arrLength;

 //    System.Text.Encoding    encodingUTF8;

 //    System.DateTime dateTime;

 //    date dateInUserTimeZone;

 //    TimeOfDay timeInUserTimeZone;

 //    str   CompanyName, VATTotal, RegNum, InvDateTime, invoiceTotalVat, base64, tempFileName;

 //    Image imgCon;


 //    Microsoft.Dynamics.ApplicationSuite.QRCode.Encoder encoder = new Microsoft.Dynamics.ApplicationSuite.QRCode.Encoder();


 //    encodingUTF8 = System.Text.Encoding::get_UTF8();

 //    CurarrIndex = 0;


 //    dateInUserTimeZone = DateTimeUtil::date(DateTimeUtil::addHours( _CustInvoiceJour.InvoiceDate , 0 ));

 //    timeInUserTimeZone = DateTimeUtil::time(DateTimeUtil::applyTimeZoneOffset(_CustInvoiceJour.CreatedDateTime, DateTimeUtil::getUserPreferredTimeZone()));

 //    dateTime = DateTimeUtil::newDateTime(dateInUserTimeZone, timeInUserTimeZone +10800   , DateTimeUtil::getUserPreferredTimeZone());


 //   //CompanyName = "أسم الشركة" + CompanyInfo::find().Name;

 //    RegNum =  CompanyInfo::find().CoRegNum;

 //    InvDateTime =  System.String::Format('{0:yyyy-MM-dd HH:mm:ss}', dateTime);

 //    VATTotal =  num2str(_custInvoiceJour.SumTax,2,2,1,0);

 //    invoiceTotalVat =  num2str(_custInvoiceJour.InvoiceAmount,2,2,1,0) ;



 //    //arrLength = strLen(CompanyName) + strLen(RegNum) + strLen(InvDateTime) + strLen(invoiceTotalVat) + strLen(VATTotal) + 10;

 //    arrLength =   strLen(RegNum) + strLen(InvDateTime) + strLen(invoiceTotalVat) + strLen(VATTotal)+ 10;

 //    byteArray = new System.Byte[arrLength]();


 //    //this.fillByteArrayQRData(1, strLen(CompanyName), encodingUTF8.GetBytes(CompanyName));

 //    this.fillByteArrayQRData(1, strLen(RegNum), encodingUTF8.GetBytes(RegNum));

 //    this.fillByteArrayQRData(2, strLen(InvDateTime), encodingUTF8.GetBytes(InvDateTime));

 //    this.fillByteArrayQRData(3, strLen(invoiceTotalVat), encodingUTF8.GetBytes(invoiceTotalVat));

 //    this.fillByteArrayQRData(4, strLen(VATTotal), encodingUTF8.GetBytes(VATTotal));


 //    base64 = System.Convert::ToBase64String(byteArray);


 //    tempFileName   = encoder.GetTempFile(base64);

 //    FileIOPermission perm  = new FileIOPermission(tempFileName,'RW');

 //    perm.assert();


 //    binData.loadFile(tempFileName);

 //    con = binData.getData();


 //    return con;

 //}


 //public static container QRCodeOld(Str _QRContents)

 //{

 //    System.Drawing.Bitmap bm = null;

 //    try

 //    {

 //        var qrCodeEncoder = new Encoder();

 //        bm = qrCodeEncoder.Encode(_QRContents);

 //    }

 //    catch (Exception::CLRError)

 //    {

 //        error(CLRInterop::getLastException().ToString());

 //    }

 //    using (var stream = new System.IO.MemoryStream())

 //    {

 //        bm.Save(stream, System.Drawing.Imaging.ImageFormat::Bmp);

 //        bm.Dispose();

 //        return Binary::constructFromMemoryStream(stream).getContainer();

 //    }

 //}

Comments

Popular posts from this blog

update or create finical dimension on purchline

import MT_940 file create new bank statement