Foxtable(狐表)用户栏目专家坐堂 → 关于文件管理模块无数据加载是出现的错误


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

主题:关于文件管理模块无数据加载是出现的错误

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


加好友 发短信
等级:三尾狐 帖子:660 积分:3965 威望:0 精华:0 注册:2014/3/16 20:34:00
关于文件管理模块无数据加载是出现的错误  发帖心情 Post By:2014/5/1 18:51:00 [只看该作者]

如果项目无数据加载就会出现AFTERLOAD错误对话框

代码如下“

Dim web As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
'web.OfficeToolBar = True
web.Address = ProjectPath & "kindeditor\e.html"
If Tables("文件管理").current IsNot Nothing Then
    If Tables("文件管理").current.IsNull("审核") = False Then
        Do until e.form.controls("WebBrowser1").basecontrol.ReadyState = 4
            Application.DoEvents
        Loop
        Dim editor As Object = e.form.controls("WebBrowser1").basecontrol.Document.GetElementsByTagName("div")(0)
        editor.InnerHtml = "<div id='mymask' style='position:absolute;width:100%;height:100%;z-index:99999'></div>" & editor.InnerHtml
    End If
    
    Vars("编辑器校验")=0
    e.Form.Controls("TextBox1").text = Tables("文件管理").current("内容")
    e.Form.TimerEnabled = True
    e.Form.TimerInterval = 500
End If

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("文件管理","文件类型|文件名称")
For Each n As WinForm.TreeNode In trv.Nodes
         Dim flag As Boolean = False
        For Each cn As WinForm.TreeNode In n.Nodes
            If cn.DataRow("日期") = Date.Today Then
                cn.Text = cn.Text & "(新)"
cn.Ic
                flag = True
            Else
cn.Ic
            End If
        Next
If flag Then
    n.Text = n.Text & "(新)"
n.ic
Else
    n.ic
End If
Next


For Each s As String In "ComboBox1|TextBox4|Button3|Button1|Button4|TextBox5|DateTimePicker2|Button6|Button7|TextBox6|DateTimePicker3|Button8|Button9|GroupBox5|GroupBox6".Split("|")
     e.Form.Controls(s).Enabled = Tables("文件管理").current.IsNull("审核")
Next
For Each s As String In "ComboBox1|TextBox4|Button3|Button1|Button4".Split("|")
    e.Form.Controls(s).Enabled = (User.roles = "日常事务")
Next
For Each s As String In "TextBox5|DateTimePicker2|Button6|Button7|GroupBox5".Split("|")
    e.Form.Controls(s).Enabled = (User.Roles = "行销部主管")
Next
For Each s As String In "TextBox6|DateTimePicker3|Button8|Button9|GroupBox6".Split("|")
    e.Form.Controls(s).Enabled = (User.Roles = "行销部经理")
Next

 回到顶部
帅哥哟,离线,有人找我吗?
lsy
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:5246 积分:33163 威望:0 精华:8 注册:2013/1/17 21:28:00
  发帖心情 Post By:2014/5/1 19:14:00 [只看该作者]

Dim web As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
'web.OfficeToolBar = True
web.Address = ProjectPath & "kindeditor\e.html"
If Tables("文件管理").current IsNot Nothing Then
    If Tables("文件管理").current.IsNull("审核") = False Then
        Do until e.form.controls("WebBrowser1").basecontrol.ReadyState = 4
            Application.DoEvents
        Loop
        Dim editor As Object = e.form.controls("WebBrowser1").basecontrol.Document.GetElementsByTagName("div")(0)
        editor.InnerHtml = "<div id='mymask' style='position:absolute;width:100%;height:100%;z-index:99999'></div>" & editor.InnerHtml
    End If
   
    Vars("编辑器校验")=0
    e.Form.Controls("TextBox1").text = Tables("文件管理").current("内容")
    e.Form.TimerEnabled = True
    e.Form.TimerInterval = 500
End If
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("文件管理","文件类型|文件名称")
For Each n As WinForm.TreeNode In trv.Nodes
    Dim flag As Boolean = False
    For Each cn As WinForm.TreeNode In n.Nodes
        If cn.DataRow("日期") = Date.Today Then
            cn.Text = cn.Text & "(新)"
            cn.Ic
            flag = True
        Else
            cn.Ic
        End If
    Next
    If flag Then
        n.Text = n.Text & "(新)"
        n.ic
    Else
        n.ic
    End If
Next

For Each s As String In "ComboBox1|TextBox4|Button3|Button1|Button4|TextBox5|DateTimePicker2|Button6|Button7|TextBox6|DateTimePicker3|Button8|Button9|GroupBox5|GroupBox6".Split("|")
    If Tables("文件管理").current IsNot Nothing Then
        e.Form.Controls(s).Enabled = Tables("文件管理").current.IsNull("审核")
    End If
Next
For Each s As String In "ComboBox1|TextBox4|Button3|Button1|Button4".Split("|")
    e.Form.Controls(s).Enabled = (User.roles = "日常事务")
Next
For Each s As String In "TextBox5|DateTimePicker2|Button6|Button7|GroupBox5".Split("|")
    e.Form.Controls(s).Enabled = (User.Roles = "行销部主管")
Next
For Each s As String In "TextBox6|DateTimePicker3|Button8|Button9|GroupBox6".Split("|")
    e.Form.Controls(s).Enabled = (User.Roles = "行销部经理")
Next


 回到顶部