Example #1
0
        /// <summary>
        /// 生成发票二维码,字符串类型,根据需求,暂不使用此方法
        /// </summary>
        /// <param name="Receipt"></param>
        /// <returns></returns>
        public string CreateReceiptQRCode(receiptinfo Receipt)
        {
            string QRCodePath = "";

            if (Receipt != null)
            {
                string Sign          = "</>";
                string QRCodeContent = "$01";
                string CRC           = Receipt.CompanyName + Sign + Receipt.DutyParagraph + Sign + Receipt.Address + Sign + Receipt.Tel + Sign + Receipt.BankOfDeposit + Sign + Receipt.BankAccount + Sign;
                Base64 base64        = new Base64();
                string Base64Str     = base64.Encode(CRC + CRC_16.getCrc16Code(CRC));
                QRCodeContent += Base64Str + "$";
                QRCodeContent += CRC + CRC_16.getCrc16Code(CRC) + "$";
                QRCodePath     = new QRCode().CreateQRCode(QRCodeContent, 20);
            }
            return(QRCodePath);
        }