Foxtable(狐表)用户栏目专家坐堂 → [求助]无法触发datacolchanged事件


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

主题:[求助]无法触发datacolchanged事件

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


加好友 发短信
等级:超级版主 帖子:109463 积分:556971 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2024/5/21 11:14:00 [显示全部帖子]

表《返仓单》中的datacolchanged设置代码如下:
If e.DataCol.Name = "库房确认" Then
    If e.OldValue = "待返仓" And e.NewValue = "已返仓" Then
        Dim frs As list(Of DataRow) = DataTables("返仓明细").SQLSelect("返仓单号 = '" & e.DataRow("返仓单号") & "'")
        For Each dr As DataRow In frs
dim s as string = dr("库房确认")
            dr("库房确认") = "已返仓"
if s = "待返仓" then
        Dim fr As DataRow = DataTables("入库明细").SQLFind("入库单号 = '" & dr("入库单号") & "'")
        If fr IsNot Nothing Then
            dr("供应商") = fr("供应商")
            dr("入库用途") = fr("入库用途")
            dr("入库分类") = fr("分类")
            dr("备注") = fr("备注")
        End If
end if
        Next 
DataTables("返仓明细").SQLUpdate(frs)
    End If
end if

SQLSelect必须由SQLUpdate保存:http://www.foxtable.com/webhelp/topics/2901.htm

 回到顶部