With DataTables("供应商资料主表") .LoadFilter = "" '一定要清除加载条件 .LoadTop = 15 .LoadPage = 0 .Load() e.Form.Controls("页码信息").Text= "共: [" & .TotalPages & "] 页 ,当前为第[" & .LoadPage+1 & "]页" End With If DataTables("供应商资料主表").DataRows.Count = 0 Then '如果订单表没有数据 DataTables("供应商资料子表").LoadFilter = "代码 Is Null" '不加载订单明细 Else Dim ids As String For Each dr As DataRow In DataTables("供应商资料主表").DataRows ids = ids & ",'" & dr("代码") & "'" Next ids= ids.Trim(",") DataTables("供应商资料子表").LoadFilter = "代码 In (" & ids & ")" End If DataTables("供应商资料子表").LoadTop = "" DataTables("供应商资料子表").Load()
|