If e.DataRow("确定订单") = True Then '当点击'是第一次下单'时,检查有无数据是重复的, Dim count As Integer = DataTables("表A").SqlCompute("count(下单人)", "下单人 = '" & e.DataRow("下单人") & "'" ) If count >= 2 Then e.DataRow("二次下单") = True Else e.DataRow("二次下单") = False End If Else e.DataRow("二次下单") = False