public static Safetyallowanceresults BuildSafetyallowanceresultsFromRow(DataRow row) { Safetyallowanceresults entity = new Safetyallowanceresults(); entity.safeallamt = row.IsNull("safeallamt") ? decimal.Zero : row.Field <decimal>("safeallamt"); entity.safeallamt2 = row.IsNull("safeallamt2") ? decimal.Zero : row.Field <decimal>("safeallamt2"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSafetyallowanceresults(ref DataRow row, Safetyallowanceresults entity) { row.SetField("safeallamt", entity.safeallamt); row.SetField("safeallamt2", entity.safeallamt2); row.SetField("userfield", entity.userfield); }