以文本方式查看主题 - 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=35260) |
||||
-- 作者:Bin -- 发布时间:2013/6/27 14:48:00 -- 上例子, 利用FInd 或者获取父表行 等都可以实现. |
||||
-- 作者:狐狸爸爸 -- 发布时间:2013/6/27 15:09:00 -- 要学会抓住问题,这个问题其实就是一句话:如何获得父行. 首先查看Datarow的全部成员: http://www.foxtable.com/help/topics/1358.htm 可以看到GetParentRow方法就是获取父行的: http://www.foxtable.com/help/topics/0432.htm
你的代码可以改为:
Dim pr As DataRow = e.DataRow.GetParentRow("进度") If e.DataCol.Name <> "更新时间" Then if pr Isnot Nothing Then pr("更新时间") = Date.Now() end If if pr Isnot Nothing Then pr("更新人") = User.Name end If End If
更多与关联表和事件相关的: http://www.foxtable.com/help/topics/2649.htm |
||||
-- 作者:Bin -- 发布时间:2013/6/27 15:13:00 -- 是不是想这样
|