Esempio n. 1
0
 public static Comment FromRow(this Comment comment, DataRow row)
 {
     comment.AccountId = row.GetIntField("AccountId");
     comment.CommentId = row.GetIntField("CommentId");
     comment.Content = row.GetStringField("Content");
     comment.InsertedDateTime = row.GetDateTimeField("InsertedDateTime");
     return comment;
 }
Esempio n. 2
0
 public static Event FromRow(this Event evt, DataRow row)
 {
     evt.AccountId = row.GetIntField("AccountId");
     evt.CodeId = row.GetIntField("CodeId");
     evt.Type = (EventType)row.GetByteField("EventTypeId");
     evt.Payload = row.GetStringField("Payload");
     return evt;
 }
Esempio n. 3
0
 public static Code FromRow(this Code code, DataRow row)
 {
     code.AccountId = row.GetIntField("AccountId");
     code.CodeId = row.GetIntField("CodeId");
     code.Type = (CodeType)row.GetByteField("CodeTypeId");
     code.Rectangle = JsonConvert.DeserializeObject<Rectangle>(row.GetStringField("CodeRectangle"));
     code.BackgroundContentType = row.GetStringField("BackgroundContentType");
     code.Payload = JsonHelper.Deserialize(row.GetStringField("Payload"), code.Type);
     return code;
 }
Esempio n. 4
0
        public static HigherLevelBlock FromRow(this HigherLevelBlock hlb, DataRow row)
        {
            hlb.blockSize = row.GetIntField("BlockSize");
            hlb.blockHeader.Version = row.GetIntField("Version");
            hlb.blockHeader.hashPrevBlock = row.GetStringField("HashPrevBlock");
            hlb.blockHeader.hashMerkleRoot = row.GetStringField("HashMerkleRoot");
            hlb.blockHeader.Time = row.GetIntField("Time");
            hlb.blockHeader.Bits = row.GetIntField("Bits");
            hlb.LowLevelBlockCounter = row.GetIntField("LowLevelBlockCounter");
            //TO DO: Finish the code

            return hlb;
        }
Esempio n. 5
0
 public static LowerLevelBlock FromRow(this LowerLevelBlock llb, DataRow row)
 {
     llb.blockSize = row.GetIntField("BlockSize");
     llb.blockHeader.Version = row.GetIntField("Version");
     llb.blockHeader.hashPrevBlock = row.GetStringField("HashPrevBlock");
     llb.blockHeader.hashMerkleRoot = row.GetStringField("HashMerkleRoot");
     llb.blockHeader.Time = row.GetIntField("Time");
     llb.blockHeader.Bits = row.GetIntField("Bits");
     llb.TransactionCounter = row.GetIntField("TransactionCounter");
     //TO DO: Finish the code
     //llb.TransactionSet. = row.Get
     return llb;
 }
Esempio n. 6
0
 public static PaymentAccount FromRow(this PaymentAccount acct, DataRow row)
 {
     acct.Address = row.GetStringField("Address");
     acct.IssuerId = row.GetIntField("IssuerId");
     acct.CurrencyCode = row.GetStringField("CurrencyCode");
     acct.PublicKey = row.GetStringField("PublicKey");
     return acct;
 }
Esempio n. 7
0
 public static Account FromRow(this Account acct, DataRow row)
 {
     acct.Id = row.GetIntField("Id");
     acct.Name = row.GetStringField("Name");
     acct.Email = row.GetStringField("Email");
     acct.Status = (AccountStatusType)(row.GetByteField("StatusId"));
     acct.ClientInfo = row.GetStringField("ClientInfo");
     return acct;
 }
Esempio n. 8
0
 public static PaymentTransaction FromRow(this PaymentTransaction trx, DataRow row)
 {
     trx.IssuerId = row.GetIntField("IssuerId");
     trx.Source = row.GetStringField("Source");
     trx.Dest = row.GetStringField("Dest");
     trx.Amount = row.GetDecimalField("Amount");
     trx.CurrencyCode = row.GetStringField("CurrencyCode");
     trx.MemoData = row.GetStringField("MemoData");
     return trx;
 }