/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSystemparametertypes(ref DataRow row, Systemparametertypes entity) { row.SetField("type_id", entity.typeId); row.SetField("type_name", entity.typeName); row.SetField("type_description", entity.typeDescription); row.SetField("userfield", entity.userfield); }
public static Systemparametertypes BuildSystemparametertypesFromRow(DataRow row) { Systemparametertypes entity = new Systemparametertypes(); entity.typeId = row.IsNull("type_id") ? 0 : row.Field <int>("type_id"); entity.typeName = row.IsNull("type_name") ? string.Empty : row.Field <string>("type_name"); entity.typeDescription = row.IsNull("type_description") ? string.Empty : row.Field <string>("type_description"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }