Foxtable(狐表)用户栏目专家坐堂 → [讨论]窗口按钮代码


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

主题:[讨论]窗口按钮代码

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/10/20 16:21:00 [显示全部帖子]

Dim t As Table = Tables("电解电容")
Dim cr As Row = t.Current
Dim cs1() As String = {"供应商","日期","暂收单号","采购单号","材料代号"}
Dim cs2() As String = {"外形尺寸_本体直径","外形尺寸_本体高","电容量测试值","损耗角正切测试值","漏电流测试值"}
If cr.DataRow.GetChildRows("电解电容检验记录录入").count = 0 Then
    Dim drs = DataTables("电解电容检验记录数据库").Select("材料代号 = '" & cr("材料代号") & "'")
    If drs.count = 0 Then
        msgbox("没找到数据库")
    Else
        For j As Integer = 1 To cr("零缺陷数量")
            Dim ndr As DataRow = DataTables("电解电容检验记录录入").AddNew
            For i As Integer = 0 To cs1.length-1
                ndr(cs1(i)) = cr(cs1(i))
            Next
            Dim fdr = drs(Rand.Next(drs.count))
            For i As Integer = 0 To cs2.length-1
                ndr(cs2(i)) = fdr(cs2(i))
            Next
           
        Next
    End If
End If

 回到顶部