Foxtable(狐表)用户栏目专家坐堂 → 强制刷新问题


  共有10550人关注过本帖平板打印复制链接

主题:强制刷新问题

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


加好友 发短信
等级:三尾狐 帖子:714 积分:5207 威望:0 精华:0 注册:2012/4/13 13:10:00
  发帖心情 Post By:2012/9/12 14:22:00 [只看该作者]

以下是引用狐狸爸爸在2012-9-8 17:04:00的发言:
你的意思是要填充有数据的列,没有数据的列就不填充?
如果这样:
 
 
If DataTables("出库").datarows.count < 1 Then
    messagebox.show("表中数据为空!")
Else
    Dim dr1 As DataRow
    Dim dt As DataTable = DataTables("出库")
    Dim r As Integer
    r = Tables("商品出库").FindRow("[出库日期] Is null", 0 , False ) '从当前行开始查找
    If r >= 0 Then '如果找到的话
        Tables("商品出库").Position = r '定位到找到的行.
        For Each dr As DataRow In dt.datarows
            dr1 = DataTables("商品出库").DataRows(r)
            For Each dc As DataCol In dt.datacols
                If dr.IsNull(dc.name) = False
                    dr1(dc.name) = dr(dc.name)
                End If
            Next
        Next
    Else
        For Each dr As DataRow In dt.datarows
            dr1 = DataTables("商品出库").DataRows.addnew()
            For Each dc As DataCol In dt.datacols
                If dr.IsNull(dc.name) = False
                    dr1(dc.name) = dr(dc.name)
                End If
            Next
        Next
    End If
    DataTables("商品出库").save()
    DataTables("出库").DataRows.Clear() '清除所有行
    DataTables("商品出库").DataCols("单价").RaiseDataColChanged()
    e.Form.Close()
End If

 

请问狐爸 ,如果不填充"商品出库"表中没有的列 该如何改呢?If dr1.IsNull(dc.name) = False 这样好像不对


 

[此贴子已经被作者于2012-9-12 14:22:36编辑过]

 回到顶部
总数 15 1 2 下一页