/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromSystemparamdefnlistcriteria(ref DataRow row, Systemparamdefnlistcriteria entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("parameter_id", entity.parameterId); row.SetField("parameter_name", entity.parameterName); row.SetField("type_id", entity.typeId); row.SetField("userfield", entity.userfield); }
public static Systemparamdefnlistcriteria BuildSystemparamdefnlistcriteriaFromRow(DataRow row) { Systemparamdefnlistcriteria entity = new Systemparamdefnlistcriteria(); entity.coNum = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num"); entity.whNum = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num"); entity.parameterId = row.IsNull("parameter_id") ? 0 : row.Field <int>("parameter_id"); entity.parameterName = row.IsNull("parameter_name") ? string.Empty : row.Field <string>("parameter_name"); entity.typeId = row.IsNull("type_id") ? 0 : row.Field <int>("type_id"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }