/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSystemparamdefnlistresults(ref DataRow row, Systemparamdefnlistresults entity) { row.SetField("column_format", entity.columnFormat); row.SetField("column_text", entity.columnText); row.SetField("column_widget", entity.columnWidget); row.SetField("custom_data1", entity.customData1); row.SetField("custom_data2", entity.customData2); row.SetField("custom_data3", entity.customData3); row.SetField("custom_data4", entity.customData4); row.SetField("custom_data5", entity.customData5); row.SetField("data_type", entity.dataType); row.SetField("default_value", entity.defaultValue); row.SetField("description", entity.description); row.SetField("name", entity.name); row.SetField("options", entity.options); row.SetField("parameter_id", entity.parameterId); row.SetField("text_values", entity.textValues); row.SetField("type_id", entity.typeId); row.SetField("user_settable", entity.userSettable); row.SetField("paramTypeId", entity.paramTypeId); row.SetField("paramTypeName", entity.paramTypeName); row.SetField("rowID", entity.rowID.ToByteArray()); row.SetField("isGlobal", entity.isGlobal); row.SetField("userfield", entity.userfield); }
public static Systemparamdefnlistresults BuildSystemparamdefnlistresultsFromRow(DataRow row) { Systemparamdefnlistresults entity = new Systemparamdefnlistresults(); entity.columnFormat = row.IsNull("column_format") ? string.Empty : row.Field <string>("column_format"); entity.columnText = row.IsNull("column_text") ? string.Empty : row.Field <string>("column_text"); entity.columnWidget = row.IsNull("column_widget") ? string.Empty : row.Field <string>("column_widget"); entity.customData1 = row.IsNull("custom_data1") ? string.Empty : row.Field <string>("custom_data1"); entity.customData2 = row.IsNull("custom_data2") ? string.Empty : row.Field <string>("custom_data2"); entity.customData3 = row.IsNull("custom_data3") ? string.Empty : row.Field <string>("custom_data3"); entity.customData4 = row.IsNull("custom_data4") ? string.Empty : row.Field <string>("custom_data4"); entity.customData5 = row.IsNull("custom_data5") ? string.Empty : row.Field <string>("custom_data5"); entity.dataType = row.IsNull("data_type") ? string.Empty : row.Field <string>("data_type"); entity.defaultValue = row.IsNull("default_value") ? string.Empty : row.Field <string>("default_value"); entity.description = row.IsNull("description") ? string.Empty : row.Field <string>("description"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.options = row.IsNull("options") ? string.Empty : row.Field <string>("options"); entity.parameterId = row.IsNull("parameter_id") ? 0 : row.Field <int>("parameter_id"); entity.textValues = row.IsNull("text_values") ? string.Empty : row.Field <string>("text_values"); entity.typeId = row.IsNull("type_id") ? 0 : row.Field <int>("type_id"); entity.userSettable = row.Field <bool>("user_settable"); entity.paramTypeId = row.IsNull("paramTypeId") ? 0 : row.Field <int>("paramTypeId"); entity.paramTypeName = row.IsNull("paramTypeName") ? string.Empty : row.Field <string>("paramTypeName"); entity.rowID = row.Field <byte[]>("rowID").ToStringEncoded(); entity.isGlobal = row.Field <bool>("isGlobal"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }