/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdemupdaterptok(ref DataRow row, Pdemupdaterptok entity) { row.SetField("cSetID", entity.cSetID); row.SetField("ImmediateFl", entity.immediateFl); row.SetField("StartDt", entity.startDt); row.SetField("Hour", entity.hour); row.SetField("Minute", entity.minute); row.SetField("AmPm", entity.amPm); row.SetField("Period", entity.period); row.SetField("PostDt", entity.postDt); row.SetField("CurrPeriodFl", entity.currPeriodFl); row.SetField("CurrDateFl", entity.currDateFl); row.SetField("iDelete", entity.iDelete); row.SetField("iTimeZoneClient", entity.iTimeZoneClient); row.SetField("userfield", entity.userfield); }
public static Pdemupdaterptok BuildPdemupdaterptokFromRow(DataRow row) { Pdemupdaterptok entity = new Pdemupdaterptok(); entity.cSetID = row.IsNull("cSetID") ? string.Empty : row.Field <string>("cSetID"); entity.immediateFl = row.Field <bool>("ImmediateFl"); entity.startDt = row.Field <DateTime?>("StartDt"); entity.hour = row.IsNull("Hour") ? 0 : row.Field <int>("Hour"); entity.minute = row.IsNull("Minute") ? 0 : row.Field <int>("Minute"); entity.amPm = row.IsNull("AmPm") ? string.Empty : row.Field <string>("AmPm"); entity.period = row.IsNull("Period") ? 0 : row.Field <int>("Period"); entity.postDt = row.Field <DateTime?>("PostDt"); entity.currPeriodFl = row.Field <bool>("CurrPeriodFl"); entity.currDateFl = row.Field <bool>("CurrDateFl"); entity.iDelete = row.IsNull("iDelete") ? 0 : row.Field <int>("iDelete"); entity.iTimeZoneClient = row.IsNull("iTimeZoneClient") ? 0 : row.Field <int>("iTimeZoneClient"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }