コード例 #1
0
        private QRStringModel QRDetail(List <QRModel> QrData)
        {
            var QRVersion     = SortDataMain("00", QrData);
            var QRType        = SortDataMain("01", QrData);
            var ApplicationID = SortDataSubField("30_00", "29_00", QrData);
            var BillerID      = SortDataSubField("30_01", "29_01", QrData);
            var Ref1          = SortDataSubField("30_02", "29_02", QrData);
            var Ref2          = SortDataSubField("30_03", "29_03", QrData);
            var CurrencyID    = SortDataMain("53", QrData);
            var Amount        = SortDataMain("54", QrData);
            var CountryCode   = SortDataMain("58", QrData);
            var MerchantName  = SortDataMain("59", QrData);
            var CheckSum      = SortDataMain("63", QrData);

            var qrdetail = new QRStringModel
            {
                Version       = QRVersion,
                Type          = QRType,
                AID           = ApplicationID,
                Biller        = BillerID,
                Reference1    = Ref1,
                Reference2    = Ref2,
                Currency      = CurrencyID,
                Country       = CountryCode,
                amount        = Amount,
                Name          = MerchantName,
                CheckSumCRC16 = CheckSum
            };

            return(qrdetail);
        }
コード例 #2
0
        public void GetInfoToTextBox(QRStringModel QrData)
        {
            QRVersion.Text     = QrData.Version.Data;
            QRType.Text        = QrData.Type.Data;
            ApplicationID.Text = QrData.AID.Data;
            BillerID.Text      = QrData.Biller.Data;
            Ref1.Text          = QrData.Reference1.Data;
            Ref2.Text          = QrData.Reference2.Data;
            CurrencyID.Text    = QrData.Currency.Data;
            Amount.Text        = QrData.amount.Data;
            CountryCode.Text   = QrData.Country.Data;
            MerchantName.Text  = QrData.Name.Data;
            CheckSum.Text      = QrData.CheckSumCRC16.Data;

            //var Getdata = QrData.FirstOrDefault();

            //QRVersion.Text = QrData?.Version.Data ?? "";
            //QRType.Text = QrData?.Type.Data ?? "";
            //ApplicationID.Text = QrData?.AID.Data ?? "";
            //BillerID.Text = QrData?.Biller.Data ?? "";
            //Ref1.Text = QrData?.Reference1.Data ?? "";
            //Ref2.Text = QrData?.Reference2.Data ?? "";
            //CurrencyID.Text = QrData?.Currency.Data ?? "";
            //Amount.Text = QrData?.amount.Data ?? "";
            //CountryCode.Text = QrData?.Country.Data ?? "";
            //MerchantName.Text = QrData?.Name.Data ?? "";
            //CheckSum.Text = QrData?.CheckSumCRC16.Data ?? "";
        }