Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]怎样定义当前行?

1楼
gaoqr 发表于:2010/12/9 10:46:00
http://help.foxtable.com/topics/0431.htm  中的代码

Dim drs As List(Of Datarow)
drs = 
DataTables("产品").DataRows(0).GetChildRows("订单")
For Each 
dr As DataRow In drs
    dr(
"折扣") = 0.1

Next

想改 DataRows(0为当前行,怎样定义?
2楼
gaoqr 发表于:2010/12/9 10:53:00
If e.DataCol.name = "商砼" Then
    If e.DataRow("商砼") = True Then
        Dim prs As List(Of DataRow)
        prs = DataTables("实体预算书").e.DataRow.GetChildRows("实体材料分析")
        For Each pr As DataRow In prs           
            If pr("材料编号") = "AZ0020" Then
                pr("系数") = 0.2
            Else If pr("材料编号") = "XD0300" Or pr("材料编号") = "XF0030" Then
                pr("定额用量") = 0
            End If
        Next
    End If
End If

想改为这样,出现错误。
[此贴子已经被作者于2010-12-9 10:57:56编辑过]
3楼
czy 发表于:2010/12/9 10:54:00
Dim drs As List(Of DataRow)
drs = Tables("产品").Current.DataRow.GetChildRows("订单")
For Each dr As DataRow In drs
    dr("折扣") = 0.1
Next
4楼
gaoqr 发表于:2010/12/9 10:57:00
谢谢 czy 版主!
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.