/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromKpqentryresults(ref DataRow row, Kpqentryresults entity) { row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("kitverno", entity.kitverno); row.SetField("whsename", entity.whsename); row.SetField("proddescrip", entity.proddescrip); row.SetField("allow8791fl", entity.allow8791fl); row.SetField("userfield", entity.userfield); }
public static Kpqentryresults BuildKpqentryresultsFromRow(DataRow row) { Kpqentryresults entity = new Kpqentryresults(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.kitverno = row.IsNull("kitverno") ? 0 : row.Field <int>("kitverno"); entity.whsename = row.IsNull("whsename") ? string.Empty : row.Field <string>("whsename"); entity.proddescrip = row.IsNull("proddescrip") ? string.Empty : row.Field <string>("proddescrip"); entity.allow8791fl = row.IsNull("allow8791fl") ? string.Empty : row.Field <string>("allow8791fl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }