Foxtable(狐表)用户栏目专家坐堂 → UserCode错误原因


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

主题:UserCode错误原因

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


加好友 发短信
等级:二尾狐 帖子:576 积分:4731 威望:0 精华:0 注册:2014/7/3 15:28:00
UserCode错误原因  发帖心情 Post By:2016/3/15 13:02:00 [显示全部帖子]

求助老师:换到了一台新的WIN7系统电脑上使用我的项目,出现如下两个错误,求解决,谢谢

 


此主题相关图片如下:1.png
按此在新窗口浏览图片

 

代码:
For Each t As Table In Tables '显示所有表和列
    t.Visible = True
    t.AllowEdit = True
    For Each c As Col In t.Cols
        c.Visible = True
        c.AllowEdit = True
    Next
Next
Tables("授权表").Visible = (User.Type <> UserTypeEnum.User )
If  User.Type <> UserTypeEnum.User Then
    Return
End If
For Each dr As DataRow In DataTables("授权表").Select("用户名 = '" & User.Name & "'" )
    If dr.IsNull("列名") Then
        For Each t As Table In Tables
            If t.DataTable.Name = dr("表名") Then
                t.Visible = Not dr("不可见")
                t.AllowEdit = Not dr("不可编辑")
            End If
        Next
    Else
        For Each t As Table In Tables
            If t.DataTable.Name = dr("表名") Then
                For Each c As Col In t.Cols
                    If c.Name = dr("列名") Then
                        c.Visible = Not dr("不可见")
                        c.AllowEdit = Not dr("不可编辑")
                    End If
                Next
            End If
        Next
    End If
Next

 

 

 


此主题相关图片如下:2.png
按此在新窗口浏览图片

代码

Dim a As object = BaseMainForm.controls("C1Ribbon1")

a.ConfigToolBar.Visible = False    '配置栏


Dim ids As String
Dim n As Integer = 6 '未来天数,含今天,所以实际是未来7天
For Each P As DataRow In DataTables("员工").DataRows
    Dim O As Date = P("出生日期")
    Dim O1 As New Date(Date.Today.Year,O.Month,O.Day)
    Dim O2 As  New Date(Date.Today.AddDays(n).Year,O.Month,O.Day)
    If (O1 >= Date.Today AndAlso O1 < Date.Today.AddDays(n)) OrElse (O2 >= Date.Today AndAlso O2 < Date.Today.AddDays(n)) Then
        ids = ids & "," & P("_Identify")
    End If
Next
If ids > "" Then
    ids = ids.Trim(",")
    Tables("员工").filter = "[_Identify] In (" & ids &")"
End If

Dim d As Date = ReadBirthDay("410110197109172433")
Output.Show(d.Month & "-" & d.day)
  Forms("生日").open
     MessageBox.Show("有员工过生日了!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)

 


 回到顶部