Foxtable(狐表)用户栏目专家坐堂 → 筛选后的数据填充到B表


  共有2212人关注过本帖树形打印复制链接

主题:筛选后的数据填充到B表

帅哥哟,离线,有人找我吗?
有点色
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/4/25 9:31:00 [显示全部帖子]

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

 回到顶部