/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGlsfsetupm(ref DataRow row, Glsfsetupm entity) { row.SetField("memoryLoc", entity.memoryLoc); row.SetField("periodCal", entity.periodCal); row.SetField("totalLevel", entity.totalLevel); row.SetField("clearFl", entity.clearFl); row.SetField("comment", entity.comment); row.SetField("userfield", entity.userfield); }
public static Glsfsetupm BuildGlsfsetupmFromRow(DataRow row) { Glsfsetupm entity = new Glsfsetupm(); entity.memoryLoc = row.IsNull("memoryLoc") ? string.Empty : row.Field <string>("memoryLoc"); entity.periodCal = row.IsNull("periodCal") ? 0 : row.Field <int>("periodCal"); entity.totalLevel = row.IsNull("totalLevel") ? 0 : row.Field <int>("totalLevel"); entity.clearFl = row.Field <bool>("clearFl"); entity.comment = row.IsNull("comment") ? string.Empty : row.Field <string>("comment"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }