Foxtable(狐表)用户栏目专家坐堂 → 不包含列名代码出错


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

主题:不包含列名代码出错

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


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

Case "招标审核"
    Dim fdr As DataRow = DataTables("开标记录").Find(filt)
    Dim nms() As String = {"项目状态","审核","资料类别"}
    If fdr Is Nothing AndAlso e.NewValue = "仅标录" Then
        Dim ndr As Row = Tables("开标记录").AddNew()
        For Each nm As String In nms
            If e.DataTable.DataCols.Contains(nm) Then
                ndr(nm) = dr(nm)
            End If
        Next
    Else
        If fdr IsNot Nothing Then
            fdr.Delete()
            Return
        End If
    End If

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


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

Case "招标审核"
    Dim fdr As DataRow = DataTables("开标记录").Find(filt)
    Dim nms() As String = {"项目状态","审核","资料类别"}
    If fdr Is Nothing AndAlso e.NewValue = "仅标录" Then
        Dim ndr As Row = Tables("开标记录").AddNew()
        For Each dc As DataCol In DataTables("开标记录").DataCols
            For Each nm As String In nms
                If e.DataTable.DataCols.Contains(dc.Name) AndAlso array.indexof(nms, dc.name) < 0 Then
                    ndr(dc.Name) = dr(dc.Name)
                End If
            Next
        Next
    Else
        If fdr IsNot Nothing Then
            fdr.Delete()
            Return
        End If
    End If

 回到顶部