以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关联表中主表与明细表的关系  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=121983)

--  作者:ZJZK2018
--  发布时间:2018/7/16 21:24:00
--  关联表中主表与明细表的关系
老师:
      开标记录与标录明细已建立关联表(开标记录.标录明细)
我的需求是:当关联表没有“标录明细”时,主表的“最高有效报价”和“最低有效报价”显示为False,下面这段代码没有启动,如何调整,写在哪个事件中为好?

Dim pr As DataRow = e.DataRow.GetParentRow("开标记录") \'获得此标录明细对应的开标记录
If pr IsNot  Nothing Then \'如果有对应的开标记录
    If pr.GetChildRows("标录明细").Count  < 1 Then \'标录明细没有
        pr("最高有效报价") = False
        pr("最低有效报价") = False
    End If
End If

--  作者:有点蓝
--  发布时间:2018/7/16 21:33:00
--  
主表datacolchanged
明细子表datacolchanged,datarowadded,datarowdeleting事件都要判断