Example #1
0
 public DonationProfile(IAccount account, DonationCredits credits)
 {
     Account      = account;
     Credits      = credits;
     Transactions = new Dictionary <string, DonationTransaction>();
     Gifts        = new Dictionary <string, string>();
 }
Example #2
0
        public void Deserialize(GenericReader reader)
        {
            int version = reader.GetVersion();

            switch (version)
            {
            case 0:
            {
                ID               = reader.ReadString();
                _State           = reader.ReadFlag <DonationTransactionState>();
                Account          = reader.ReadAccount();
                Email            = reader.ReadString();
                Total            = reader.ReadDecimal();
                _Credit          = reader.ReadLong();
                _Time            = reader.ReadDouble();
                Version          = reader.ReadInt();
                _InternalVersion = reader.ReadInt();
                _Notes           = reader.ReadString();
                _Extra           = reader.ReadString();

                DeliverFrom = reader.ReadMobile();
                DeliverTo   = reader.ReadMobile();

                DeliveryTime = reader.ReadDouble();
            }
            break;
            }
        }
Example #3
0
 public DonationTransaction(
     string id,
     DonationTransactionState state,
     IAccount account,
     string email,
     decimal total,
     DonationCredits credit,
     TimeStamp time,
     int version  = 0,
     string notes = null,
     string extra = null)
 {
     ID               = id;
     _State           = state;
     Account          = account;
     Email            = email;
     Total            = total;
     _Credit          = credit;
     _Time            = time;
     Version          = version;
     _InternalVersion = version;
     _Notes           = notes ?? String.Empty;
     _Extra           = extra ?? String.Empty;
 }
Example #4
0
 public bool Equals(DonationCredits other)
 {
     return(Value == other.Value);
 }
Example #5
0
		public void Deserialize(GenericReader reader)
		{
			int version = reader.GetVersion();

			switch (version)
			{
				case 0:
					{
						ID = reader.ReadString();
						_State = reader.ReadFlag<DonationTransactionState>();
						Account = reader.ReadAccount();
						Email = reader.ReadString();
						Total = reader.ReadDecimal();
						_Credit = reader.ReadLong();
						_Time = reader.ReadDouble();
						Version = reader.ReadInt();
						_InternalVersion = reader.ReadInt();
						_Notes = reader.ReadString();
						_Extra = reader.ReadString();

						DeliverFrom = reader.ReadMobile();
						DeliverTo = reader.ReadMobile();

						DeliveryTime = reader.ReadDouble();
					}
					break;
			}
		}
Example #6
0
		public DonationTransaction(
			string id,
			DonationTransactionState state,
			IAccount account,
			string email,
			decimal total,
			DonationCredits credit,
			TimeStamp time,
			int version = 0,
			string notes = null,
			string extra = null)
		{
			ID = id;
			_State = state;
			Account = account;
			Email = email;
			Total = total;
			_Credit = credit;
			_Time = time;
			Version = version;
			_InternalVersion = version;
			_Notes = notes ?? String.Empty;
			_Extra = extra ?? String.Empty;
		}
Example #7
0
		public bool Equals(DonationCredits other)
		{
			return Value == other.Value;
		}