Exemple #1
0
        public override void Encode()
        {
            encodeBuf.Clear();

            base.Decode();

            encodeBuf.AddRange(AddString(TxnType, 2));

            encodeBuf.AddRange(AddString(DeviceId, 8));

            encodeBuf.AddRange(AddString(OperatorId, 6));

            encodeBuf.AddRange(AddString(ShiftId.PadLeft(10, '0'), 10));

            encodeBuf.AddRange(AddString(SerialNumber.PadLeft(4, '0'), 4));

            encodeBuf.AddRange(AddString(StationId, 4));

            encodeBuf.AddRange(AddString(NonInstantRefundFlag, 1));

            encodeBuf.AddRange(AddString(TicketCardId, 16));
            encodeBuf.AddRange(AddString(TicketMainType, 2));

            encodeBuf.AddRange(AddString(TicketSubType, 2));

            encodeBuf.AddRange(AddString(TxTotalAmt.PadLeft(8, '0'), 8));

            encodeBuf.AddRange(AddString(CardRemainAmt.PadLeft(8, '0'), 8));

            encodeBuf.AddRange(AddString(TicketDeposite.PadLeft(8, '0'), 8));

            encodeBuf.AddRange(AddString(ProcessingFee.PadLeft(8, '0'), 8));

            encodeBuf.AddRange(AddString(ManualId, 10));

            encodeBuf.AddRange(AddString(TxnTime, 14));

            encodeBuf.AddRange(AddString(CredentialsType, 1));

            encodeBuf.AddRange(AddString(CredentialsNumber, 20));

            encodeBuf.AddRange(AddString(Spare.PadLeft(48, '0'), 48));
        }
Exemple #2
0
 public override void Encode()
 {
     encodeBuf.Clear();
     encodeBuf.AddRange(AddString(DeviceId, 8));
     encodeBuf.AddRange(AddString(TxnGroupNumber.PadLeft(2, '0'), 2));
     encodeBuf.AddRange(AddString(SerialNumber.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(StationId, 4));
     encodeBuf.AddRange(AddString(TxnType, 2));
     encodeBuf.AddRange(AddString(TicketMainType, 2));
     encodeBuf.AddRange(AddString(TicketSubType, 2));
     encodeBuf.AddRange(AddString(TicketPriceCode, 2));
     encodeBuf.AddRange(AddString(SamCardNumber, 8));
     encodeBuf.AddRange(AddString(TicketLogicalId.PadLeft(16, '0'), 16));
     encodeBuf.AddRange(AddString(TicketWriteCouter.PadLeft(6, '0'), 6));
     encodeBuf.AddRange(AddString(ThisTicketOperateAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TicketRemainAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TxnTime, 14));
     encodeBuf.AddRange(AddString(LastTxnDeviceId, 8));
     encodeBuf.AddRange(AddString(LastTxnSerialNumber.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTxnAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTxnTime, 14));
     encodeBuf.AddRange(AddString(TACCode, 8));
     encodeBuf.AddRange(AddString(PaymentType, 1));
     encodeBuf.AddRange(AddString(PaymentCardId, 16));
     encodeBuf.AddRange(AddString(DestinationStationId, 4));
     encodeBuf.AddRange(AddString(TxReasonCode, 3));
     encodeBuf.AddRange(AddString(DegradeMode, 4));
     encodeBuf.AddRange(AddString(TxTotalaAmt.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TicketDeposite.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TxProcessingFee.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(TicketValidDate.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(LastTicketValidDate.PadLeft(8, '0'), 8));
     encodeBuf.AddRange(AddString(OperatorId, 6));
     encodeBuf.AddRange(AddString(ShiftId.PadLeft(10, '0'), 10));
     encodeBuf.AddRange(AddString(Spare.PadLeft(20, '0'), 20));
 }