/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromDbfieldnameresults(ref DataRow row, Dbfieldnameresults entity) { row.SetField("fieldName", entity.fieldName); row.SetField("fieldDataType", entity.fieldDataType); row.SetField("fieldLabel", entity.fieldLabel); row.SetField("fieldFormat", entity.fieldFormat); row.SetField("dbfieldnamersltuf", entity.dbfieldnamersltuf); row.SetField("userfield", entity.userfield); }
public static Dbfieldnameresults BuildDbfieldnameresultsFromRow(DataRow row) { Dbfieldnameresults entity = new Dbfieldnameresults(); entity.fieldName = row.IsNull("fieldName") ? string.Empty : row.Field <string>("fieldName"); entity.fieldDataType = row.IsNull("fieldDataType") ? string.Empty : row.Field <string>("fieldDataType"); entity.fieldLabel = row.IsNull("fieldLabel") ? string.Empty : row.Field <string>("fieldLabel"); entity.fieldFormat = row.IsNull("fieldFormat") ? string.Empty : row.Field <string>("fieldFormat"); entity.dbfieldnamersltuf = row.IsNull("dbfieldnamersltuf") ? string.Empty : row.Field <string>("dbfieldnamersltuf"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }