public Card(FFXCard card, string user)
		{
			CardID = card.CardID;
			CardHolder = card.CardHolder.Firstname + " " + card.CardHolder.Surname;
			CardNumber = card.Number;
			Currency = card.Currency.Code;
			Balance = (Convert.ToDouble(card.Available) - Convert.ToDouble(card.Blocked)).ToString("F");
			Active = card.CardStatus.Current;
		}
Example #2
0
        public bool Update(FFXCard c)
        {
            bool changed = false;

            string newBalance = (Convert.ToDouble(c.Available) - Convert.ToDouble(c.Blocked)).ToString("F");
            bool   newActive  = c.CardStatus.Current;

            if (Active != newActive)
            {
                Active  = newActive;
                changed = true;
            }
            if (Balance != newBalance)
            {
                Balance = newBalance;
                changed = true;
            }

            return(changed);
        }