Beispiel #1
0
            public void Set_Invoice_Furs_Token()
            {
                if (Invoice_FURS_Token == null)
                {
                    Invoice_FURS_Token = new UniversalInvoice.Invoice_FURS_Token();
                }
                Invoice_FURS_Token.tUniqueMessageID.Set(this.FURS_ZOI_v.v);
                Invoice_FURS_Token.tUniqueInvoiceID.Set(this.FURS_EOR_v.v);

                if (this.FURS_Image_QRcode != null)
                {
                    using (MemoryStream m = new MemoryStream())
                    {
                        this.FURS_Image_QRcode.Save(m, this.FURS_Image_QRcode.RawFormat);
                        byte[] imageBytes = m.ToArray();

                        // Convert byte[] to Base64 String
                        string base64String = Convert.ToBase64String(imageBytes);
                        Invoice_FURS_Token.tQR.Set(base64String);
                    }
                }
            }
Beispiel #2
0
            public bool Read_FURS_Response_Data(long DocProformaInvoice_ID, ref DataTable dt)
            {
                string sql = "select MessageID,UniqueInvoiceID,BarCodeValue from fvi_slo_response where DocInvoice_ID = " + DocProformaInvoice_ID.ToString();
                string Err = null;
                if (DBSync.DBSync.ReadDataTable(ref dt, sql, ref Err))
                {
                    if (dt.Rows.Count > 0)
                    {
                        FURS_ZOI_v = tf.set_string(dt.Rows[0]["MessageID"]);
                        FURS_EOR_v = tf.set_string(dt.Rows[0]["UniqueInvoiceID"]);
                        FURS_QR_v = tf.set_string(dt.Rows[0]["BarCodeValue"]);
                        this.FURS_Image_QRcode = null;
                    }
                    else
                    {
                        if (Invoice_FURS_Token == null)
                        {
                            Invoice_FURS_Token = new UniversalInvoice.Invoice_FURS_Token();
                        }
                        Invoice_FURS_Token.tUniqueMessageID.Set("");
                        Invoice_FURS_Token.tUniqueInvoiceID.Set("");
                        Invoice_FURS_Token.tQR.Set("");
                    }
                    return true;

                }
                else
                {
                    LogFile.Error.Show("ERROR:InvoiceData:Read_FURS_Response_Data:sql=" + sql + "\r\nErr=" + Err);
                    return false;
                }
            }