Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArgroupcopy(ref DataRow row, Argroupcopy entity)
 {
     row.SetField("fromgroupid", entity.fromgroupid);
     row.SetField("togroupid", entity.togroupid);
     row.SetField("name", entity.name);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Argroupcopy BuildArgroupcopyFromRow(DataRow row)
        {
            Argroupcopy entity = new Argroupcopy();

            entity.fromgroupid = row.IsNull("fromgroupid") ? string.Empty : row.Field <string>("fromgroupid");
            entity.togroupid   = row.IsNull("togroupid") ? string.Empty : row.Field <string>("togroupid");
            entity.name        = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.rowid       = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }