/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromEtccdeterrorstotals(ref DataRow row, Etccdeterrorstotals entity) { row.SetField("toterr", entity.toterr); row.SetField("tothdrerr", entity.tothdrerr); row.SetField("totlnerr", entity.totlnerr); row.SetField("totexc", entity.totexc); row.SetField("tothdrexc", entity.tothdrexc); row.SetField("totlnexc", entity.totlnexc); row.SetField("totinf", entity.totinf); row.SetField("tothdrinf", entity.tothdrinf); row.SetField("totlninf", entity.totlninf); row.SetField("userfield", entity.userfield); }
public static Etccdeterrorstotals BuildEtccdeterrorstotalsFromRow(DataRow row) { Etccdeterrorstotals entity = new Etccdeterrorstotals(); entity.toterr = row.IsNull("toterr") ? 0 : row.Field <int>("toterr"); entity.tothdrerr = row.IsNull("tothdrerr") ? 0 : row.Field <int>("tothdrerr"); entity.totlnerr = row.IsNull("totlnerr") ? 0 : row.Field <int>("totlnerr"); entity.totexc = row.IsNull("totexc") ? 0 : row.Field <int>("totexc"); entity.tothdrexc = row.IsNull("tothdrexc") ? 0 : row.Field <int>("tothdrexc"); entity.totlnexc = row.IsNull("totlnexc") ? 0 : row.Field <int>("totlnexc"); entity.totinf = row.IsNull("totinf") ? 0 : row.Field <int>("totinf"); entity.tothdrinf = row.IsNull("tothdrinf") ? 0 : row.Field <int>("tothdrinf"); entity.totlninf = row.IsNull("totlninf") ? 0 : row.Field <int>("totlninf"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }