示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIonioboxxml(ref DataRow row, Ionioboxxml entity)
 {
     row.SetField("id", entity.id);
     row.SetField("direction", entity.direction);
     row.SetField("bodtype", entity.bodtype);
     row.SetField("createdatetime", entity.createdatetime);
     row.SetField("wasprocessed", entity.wasprocessed);
     row.SetField("displayxml", entity.displayxml);
     row.SetField("bodid", entity.bodid);
     row.SetField("errormsg", entity.errormsg);
     row.SetField("dbrowid", entity.dbrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Ionioboxxml BuildIonioboxxmlFromRow(DataRow row)
        {
            Ionioboxxml entity = new Ionioboxxml();

            entity.id             = row.IsNull("id") ? 0 : row.Field <long>("id");
            entity.direction      = row.IsNull("direction") ? string.Empty : row.Field <string>("direction");
            entity.bodtype        = row.IsNull("bodtype") ? string.Empty : row.Field <string>("bodtype");
            entity.createdatetime = row.Field <DateTime?>("createdatetime");
            entity.wasprocessed   = row.IsNull("wasprocessed") ? 0 : row.Field <int>("wasprocessed");
            entity.displayxml     = row.IsNull("displayxml") ? string.Empty : row.Field <string>("displayxml");
            entity.bodid          = row.IsNull("bodid") ? string.Empty : row.Field <string>("bodid");
            entity.errormsg       = row.IsNull("errormsg") ? string.Empty : row.Field <string>("errormsg");
            entity.dbrowid        = row.Field <byte[]>("dbrowid").ToStringEncoded();
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }