/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromUpdateprodcatlist(ref DataRow row, Updateprodcatlist entity) { row.SetField("co_num", entity.coNum); row.SetField("wh_num", entity.whNum); row.SetField("prodcat", entity.prodcat); row.SetField("pick_sequence", entity.pickSequence); row.SetField("description", entity.description); row.SetField("addfl", entity.addfl); row.SetField("changefl", entity.changefl); row.SetField("restrictfl", entity.restrictfl); row.SetField("custom_data", entity.customData); row.SetField("userfield", entity.userfield); }
public static Updateprodcatlist BuildUpdateprodcatlistFromRow(DataRow row) { Updateprodcatlist entity = new Updateprodcatlist(); 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.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.pickSequence = row.IsNull("pick_sequence") ? 0 : row.Field <int>("pick_sequence"); entity.description = row.IsNull("description") ? string.Empty : row.Field <string>("description"); entity.addfl = row.Field <bool>("addfl"); entity.changefl = row.Field <bool>("changefl"); entity.restrictfl = row.Field <bool>("restrictfl"); entity.customData = row.IsNull("custom_data") ? string.Empty : row.Field <string>("custom_data"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }