/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromRssjlookupresults(ref DataRow row, Rssjlookupresults entity) { row.SetField("groupnm", entity.groupnm); row.SetField("jobdesc", entity.jobdesc); row.SetField("runtydesc", entity.runtydesc); row.SetField("interval", entity.interval); row.SetField("starttype", entity.starttype); row.SetField("startdt", entity.startdt); row.SetField("starttmdisp", entity.starttmdisp); row.SetField("userfield", entity.userfield); }
public static Rssjlookupresults BuildRssjlookupresultsFromRow(DataRow row) { Rssjlookupresults entity = new Rssjlookupresults(); entity.groupnm = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm"); entity.jobdesc = row.IsNull("jobdesc") ? string.Empty : row.Field <string>("jobdesc"); entity.runtydesc = row.IsNull("runtydesc") ? string.Empty : row.Field <string>("runtydesc"); entity.interval = row.IsNull("interval") ? 0 : row.Field <int>("interval"); entity.starttype = row.IsNull("starttype") ? string.Empty : row.Field <string>("starttype"); entity.startdt = row.Field <DateTime?>("startdt"); entity.starttmdisp = row.IsNull("starttmdisp") ? string.Empty : row.Field <string>("starttmdisp"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }