/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromEhfeeresults(ref DataRow row, Ehfeeresults entity) { row.SetField("ehfaddonno", entity.ehfaddonno); row.SetField("ehfamt", entity.ehfamt); row.SetField("ehfexemptamt", entity.ehfexemptamt); row.SetField("userfield", entity.userfield); }
public static Ehfeeresults BuildEhfeeresultsFromRow(DataRow row) { Ehfeeresults entity = new Ehfeeresults(); entity.ehfaddonno = row.IsNull("ehfaddonno") ? 0 : row.Field <int>("ehfaddonno"); entity.ehfamt = row.IsNull("ehfamt") ? decimal.Zero : row.Field <decimal>("ehfamt"); entity.ehfexemptamt = row.IsNull("ehfexemptamt") ? decimal.Zero : row.Field <decimal>("ehfexemptamt"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }