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

            encodeBuf.AddRange(AddString(LineId, 2));
            encodeBuf.AddRange(AddString(StationId, 4));
            encodeBuf.AddRange(AddString(OperatorId, 6));
            encodeBuf.AddRange(AddString(DoublePrivilegeId, 6));
            encodeBuf.AddRange(AddString(OperateTime, 14));
            encodeBuf.AddRange(AddString(OperateType, 2));
            encodeBuf.AddRange(AddString(CashKind, 2));

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

            encodeBuf.AddRange(AddString(ShiftId.PadLeft(10, ' '), 10));
            encodeBuf.AddRange(AddString(DeviceId.PadLeft(8, ' '), 8));
            encodeBuf.AddRange(AddString(ShiftFlag.PadLeft(2, ' '), 2));
        }