12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using Dfs.WayneChina.SpsDbManager.ResultSet;
- using System.Collections.Generic;
- using System.Text;
- namespace Dfs.WayneChina.IPosPlus
- {
- public class VersionedListedCard
- {
- public VersionedListedCard(byte version, string validStartDate, string expiryDate, int cardCount, List<ListedCard> listedCards)
- {
- Version = version;
- ValidStartDate = validStartDate;
- ExpiryDate = expiryDate;
- CardCount = cardCount;
- ListedCards = listedCards;
- AllCards = FormatCardList(listedCards);
- }
- private string FormatCardList(List<ListedCard> listedCards)
- {
- if (listedCards == null)
- return string.Empty;
- StringBuilder sb = new StringBuilder();
- foreach (var card in listedCards)
- {
- sb.Append(card.CardNo.PadLeft(20, '0'));
- }
- return sb.ToString();
- }
- public byte Version { get; set; }
- public string ValidStartDate { get; set; }
- public string ExpiryDate { get; set; }
- public int CardCount { get; set; }
- public List<ListedCard> ListedCards { get; set; }
- public string AllCards { get; }
- }
- }
|