问题描述
我有两个数据表.
dtToBeChecked和dtCriteria
dtCriteria是一组记录,其中包含dtToBeChecked中每个字段的条件.
需要对照dtCriteria检查dtToBeChecked内部的记录,以查看数据是否匹配. (尝试确保dtToBeChecked中的数据全部有效并且匹配dtCriteria中的条件,如果dtToBeChecked中的值之一与dtCriteria中的值不匹配,则返回false).
例如,dtToBeChecked中的字段都存在于dtCriteria中.然后将对照dtCriteria中输入字段的值检查dtToBeChecked中的值.
我决定:
1-遍历dtToBeChecked中的行
2-获取字段名称和单元格值
3-循环遍历dtCriteria中的行,看看是否有匹配项.
4如果没有匹配项,则返回false.
我要纠正的是什么吗?
谢谢
Hi,
I have two datatables.
dtToBeChecked and dtCriteria
dtCriteria is a set of records which have criteria for each field in dtToBeChecked.
The records inside dtToBeChecked need to be checked against dtCriteria to see if the data match. (Trying to make sure that the data in dtToBeChecked are all valid and match the criteria in dtCriteria and if one of the values in dtToBeChecked does not match what is in the dtCriteria then return false).
For example, the fields in dtToBeChecked are all present in dtCriteria. And the values in dtToBeChecked will be checked against the values for the entered fields in dtCriteria.
I have decided to:
1- loop through the rows in dtToBeChecked
2- get the fieldname and cell value
3- loop through the rows in dtCriteria and see if there is a match.
4 return false if there is no match.
Is what I am trying to do correct?
Thanks
推荐答案
这篇关于将一个数据表中的数据与另一数据表中的数据进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!