/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIclotcopy(ref DataRow row, Iclotcopy entity) { row.SetField("fromwhse", entity.fromwhse); row.SetField("fromprod", entity.fromprod); row.SetField("fromlotno", entity.fromlotno); row.SetField("towhse", entity.towhse); row.SetField("toprod", entity.toprod); row.SetField("tolotno", entity.tolotno); row.SetField("rowid", entity.rowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Iclotcopy BuildIclotcopyFromRow(DataRow row) { Iclotcopy entity = new Iclotcopy(); entity.fromwhse = row.IsNull("fromwhse") ? string.Empty : row.Field <string>("fromwhse"); entity.fromprod = row.IsNull("fromprod") ? string.Empty : row.Field <string>("fromprod"); entity.fromlotno = row.IsNull("fromlotno") ? string.Empty : row.Field <string>("fromlotno"); entity.towhse = row.IsNull("towhse") ? string.Empty : row.Field <string>("towhse"); entity.toprod = row.IsNull("toprod") ? string.Empty : row.Field <string>("toprod"); entity.tolotno = row.IsNull("tolotno") ? string.Empty : row.Field <string>("tolotno"); entity.rowid = row.Field <byte[]>("rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }