This time, when I was working on a project, I encountered a combination query problem and didn't want to change the Dal layer.CodeThink about the tables that you return from the Dal layer mainly in the able type.ArticleThen I found some operations on the table directly, and then output new tables after filtering, which reduces my troubles..
The code for implementing the function is as follows:
''' ''' filter ''' ''' wait until the table to be filtered '''
filters the newly created table
'''
Public Function datatableselect (byval table as datatable) as datatable dim drarr as datarow () drarr = table. select ("cardno = '000000'") 'query drarr = table. select ("cardno = '000000'") 'fuzzy query' puts the filtered data into the new table dim newtable as datatable dim index as integer newtable = table. clone for Index = 0 to drarr. count-1 newtable. importrow (drarr (INDEX) Next index return newtable end functionend class