Foxtable(狐表)用户栏目专家坐堂 → [求助]


  共有1955人关注过本帖平板打印复制链接

主题:[求助]

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


加好友 发短信
等级:幼狐 帖子:58 积分:738 威望:0 精华:0 注册:2018/2/28 11:21:00
[求助]  发帖心情 Post By:2020/7/9 10:02:00 [只看该作者]

请问各位老师 下面程序执行在用窗口做两个按钮实验时没问题,正式运行的时候,红色那一句话条件成立,执行后没反应。
请帮忙分析。
该程序在窗口afterlode 事件下 


If User.Type = UserTypeEnum.User Then
    For Each c As WinForm.Control In e.Form.Controls
        c.Enabled = False
    Next
    Dim drs As List(Of DataRow)
    drs = DataTables("授权").Select(" [用户]   Like  '%"  &  user.group  & "%'    And   [分组] =  '"   &  e.Form.name  &  "'"    )
    If  drs.count > 0  Then
        For Each dr As DataRow In drs
            If dr.IsNull("权限") Then
                For Each c As WinForm.Control In e.Form.Controls
                    c.Enabled = True
                Next
            Else
                e.Form.Controls(dr("权限")).Enabled =  True
            End If
        Next
    Else
        MessageBox.show("您不能使用该功能")
        Forms(e.Form.name  ).close()
        '
    End If
End If

 回到顶部