Dim t1 As Table = Tables("高值耗材病人使用登记表") Dim t2 As Table = Tables("高值耗材病人使用明细表") Dim dt As DataTable = DataTables("导出骨科计划表") dt.DataRows.Clear Dim sCols() As String = {"手术日期","患者姓名","计划人","计划类型"} Dim dCols() As String = {"中标号","组件名称","使用规格","厂家","单位","数量","中标价","采购价"} For Each r As Row In t1.Rows For Each cr As DataRow In t2.DataTable.Select("编号 = '" & r("编号") & "'") Dim ndr As DataRow = dt.AddNew For Each c As String In scols ndr(c) = r(c) Next For Each c As String In dcols ndr(c) = cr(c) Next Next Next Forms("导出骨科计划主窗口").Open
|