以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  UserCode错误原因  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=82293)

--  作者:yaojun
--  发布时间:2016/3/15 13:02:00
--  UserCode错误原因

求助老师:换到了一台新的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)

 


--  作者:大红袍
--  发布时间:2016/3/15 14:17:00
--  

语音问题

 

http://www.baidu.com/baidu?wd=win7+tts&tn=monline_4_dg