/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcrunnumberlookupresults(ref DataRow row, Icrunnumberlookupresults entity) { row.SetField("whse", entity.whse); row.SetField("runno", entity.runno); row.SetField("createdt", entity.createdt); row.SetField("icsep-rowid", entity.icsepRowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Icrunnumberlookupresults BuildIcrunnumberlookupresultsFromRow(DataRow row) { Icrunnumberlookupresults entity = new Icrunnumberlookupresults(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.runno = row.IsNull("runno") ? 0 : row.Field <int>("runno"); entity.createdt = row.Field <DateTime?>("createdt"); entity.icsepRowid = row.Field <byte[]>("icsep-rowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }