Dim t As Table = Tables("窗口1_Table1") If t.Rows.Count>0 Then If MessageBox.Show("是否写入高值耗材采购总计划表","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question)=DialogResult.Yes Then Dim Cols1() As String = {"手术日期","住院号","患者姓名","中标号","组件名称","使用规格","厂家","单位","中标价","采购价","数量","金额","配送公司"} Dim Cols2() As String = {"手术日期","住院号","患者姓名","中标号","组件名称","所用规格","生产企业","单位","中标价","采购价","数量","金额","配送公司"} For Each dr1 As DataRow In DataTables("高值耗材总使用明细表").Select(t.filter,"手术日期 DESC,患者姓名 DESC" ) Dim dr2 As DataRow = DataTables("新版高值耗材采购计划总表").AddNew() For i As Integer = 0 To Cols1.Length -1 dr2(Cols2(i)) = dr1(Cols1(i)) Next Next End If End If
|