Rss & SiteMap

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

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

标题:死循环

1楼
edisontsui 发表于:2024/4/11 13:27:00

    Case "设备清单"

        Dim d1 As Date = Date.now

        Dim d2 As String = Format(d1, "yyyyMMddHHmmssfff")

        Dim y As String = d2.substring(0, 4)

        Dim m As String = d2.substring(4, 2)

        If m = "12" Then

            y = y + 1

            m = 1

            For r As Integer = 0 To Tables("设备清单").rows.count - 1

                Dim dr As Row = Tables("设备清单").Rows(r)

                If dr("报废状态") = "未报废" Then

                    dr("年份") = y

                    dr("月份") = m

                Else

                    dr("年份") = Nothing

                    dr("月份") = Nothing

                End If

            Next

        Else

            y = y

            m = m + 1

            For r As Integer = 0 To Tables("设备清单").rows.count - 1

                Dim dr As Row = Tables("设备清单").Rows(r)

                If dr("报废状态") = "未报废" Then

                    dr("年份") = y

                    dr("月份") = m

                Else

                    dr("年份") = Nothing

                    dr("月份") = Nothing

                End If

            Next

        End If

 

        '2024/4/1 这段有用的

        If user.Name = "开发者" OrElse User.Group = "模具" OrElse User.Group = "模具工程师" Then

            DataTables("设备清单").DataCols("设备编号").RaiseDataColChanged()

        End If


上面的代码是放在 maintablechanged 里面的,当切换数据表时,就一直在执行代码,好像死循环一样,以前都不会这样的。如果把红色那部分注释掉,就不会了。请问是什么原因呢?谢谢。

2楼
edisontsui 发表于:2024/4/11 13:36:00
找到原因了。
共2 条记录, 每页显示 10 条, 页签: [1]

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

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