Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcserialcopy(ref DataRow row, Icserialcopy entity)
 {
     row.SetField("fromwhse", entity.fromwhse);
     row.SetField("fromprod", entity.fromprod);
     row.SetField("fromserialno", entity.fromserialno);
     row.SetField("towhse", entity.towhse);
     row.SetField("toprod", entity.toprod);
     row.SetField("toserialno", entity.toserialno);
     row.SetField("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Icserialcopy BuildIcserialcopyFromRow(DataRow row)
        {
            Icserialcopy entity = new Icserialcopy();

            entity.fromwhse     = row.IsNull("fromwhse") ? string.Empty : row.Field <string>("fromwhse");
            entity.fromprod     = row.IsNull("fromprod") ? string.Empty : row.Field <string>("fromprod");
            entity.fromserialno = row.IsNull("fromserialno") ? string.Empty : row.Field <string>("fromserialno");
            entity.towhse       = row.IsNull("towhse") ? string.Empty : row.Field <string>("towhse");
            entity.toprod       = row.IsNull("toprod") ? string.Empty : row.Field <string>("toprod");
            entity.toserialno   = row.IsNull("toserialno") ? string.Empty : row.Field <string>("toserialno");
            entity.rowid        = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }