/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlifdetailhistresults(ref DataRow row, Glifdetailhistresults entity) { row.SetField("yr", entity.yr); row.SetField("ptd", entity.ptd); row.SetField("bptd", entity.bptd); row.SetField("ptdpctchg", entity.ptdpctchg); row.SetField("ptdpctbdgt", entity.ptdpctbdgt); row.SetField("ytd", entity.ytd); row.SetField("bytd", entity.bytd); row.SetField("ytdpctchg", entity.ytdpctchg); row.SetField("ytdpctbdgt", entity.ytdpctbdgt); }
public static Glifdetailhistresults BuildGlifdetailhistresultsFromRow(DataRow row) { Glifdetailhistresults entity = new Glifdetailhistresults(); entity.yr = row.IsNull("yr") ? 0 : row.Field <int>("yr"); entity.ptd = row.IsNull("ptd") ? decimal.Zero : row.Field <decimal>("ptd"); entity.bptd = row.IsNull("bptd") ? decimal.Zero : row.Field <decimal>("bptd"); entity.ptdpctchg = row.IsNull("ptdpctchg") ? decimal.Zero : row.Field <decimal>("ptdpctchg"); entity.ptdpctbdgt = row.IsNull("ptdpctbdgt") ? decimal.Zero : row.Field <decimal>("ptdpctbdgt"); entity.ytd = row.IsNull("ytd") ? decimal.Zero : row.Field <decimal>("ytd"); entity.bytd = row.IsNull("bytd") ? decimal.Zero : row.Field <decimal>("bytd"); entity.ytdpctchg = row.IsNull("ytdpctchg") ? decimal.Zero : row.Field <decimal>("ytdpctchg"); entity.ytdpctbdgt = row.IsNull("ytdpctbdgt") ? decimal.Zero : row.Field <decimal>("ytdpctbdgt"); return(entity); }