以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  怎样增加一个用户拥有管理员一样的权限  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=78963)

--  作者:sf020cf
--  发布时间:2015/12/21 16:32:00
--  怎样增加一个用户拥有管理员一样的权限

我想增加几个用户拥有管理员一样的权限 现代码这样写 也只能修改密码

ElseIf User.Group = "管理" Then
    \' RibbonTabs("Table").Visible = True
    \' RibbonTabs("Project").Visible = True
    \'RibbonTabs("部门工作").Groups("调度部").Visible= False
    \' RibbonTabs("部门工作").Groups("调度部").Visible = False
    RibbonTabs("日常工作").Groups("快速统计").Visible= False
    RibbonTabs("日常工作").Groups("窗口").Visible = False
    RibbonTabs("数据表").Groups("表相关").Visible= False
    RibbonTabs("数据表").Groups("列相关").Visible = False
    RibbonTabs("用户").Groups("用户").Items("用户管理").Enabled = True


 


--  作者:大红袍
--  发布时间:2015/12/21 17:02:00
--  

做一个计划任务,写入代码 http://www.foxtable.com/help/topics/0657.htm

 

Dim frm = Windows.Forms.Form.ActiveForm
If frm IsNot Nothing Then
    If frm.Name = "Class185" Then
        If user.group = "管理" Then
            frm.controls("btnGroup").Enabled = True
            frm.controls("btnRole").Enabled = True
            \'Button2
            \'btnUserTable
            \'btnRole
            \'btnExtProperty
            \'btnDefault
            \'lstUsers
            \'btnGroup
            \'btnEdit
            \'btnDelete
            \'btnAdd
            \'
        End If
    End If
End If


--  作者:sf020cf
--  发布时间:2015/12/21 17:17:00
--  
对了 我菜单有自动计算菜单组件 也勾选了相应的单元数 累计值 平均值 右下角为什么没有显示
--  作者:大红袍
--  发布时间:2015/12/21 17:19:00
--  
只有数值列,才会统计,字符列不计算。
--  作者:sf020cf
--  发布时间:2015/12/21 17:29:00
--  

是数值列 重量 体积 数量 都是双精度小数

 


--  作者:sf020cf
--  发布时间:2015/12/21 17:35:00
--  

我这么描述我要增加管理员一样的权限的用户是为了各部门经理属于管理组 能增加自己部门的用户 我把

您给的代码加进去了 还是不行

Dim frm = Windows.Forms.Form.ActiveForm
If frm IsNot Nothing Then
    If frm.Name = "Class185" Then
        If user.group = "管理" Then
            frm.controls("btnAdd").Enabled = True
            frm.controls("btnDelete").Enabled = True
            frm.controls("Button2").Enabled = True
            frm.controls("btnUserTable").Enabled = True
            frm.controls("btnRole").Enabled = True
            frm.controls("btnExtProperty").Enabled = True
            frm.controls("btnDefault").Enabled = True
            frm.controls("lstUsers").Enabled = True
            frm.controls("btnGroup").Enabled = True
            frm.controls("btnEdi").Enabled = True
           
           
        End If
    End If
End If


--  作者:大红袍
--  发布时间:2015/12/21 17:48:00
--  

这样写,可以增加用户等操作。但是增加的,不会显示出来,无法管理的。

 

Dim frm = Windows.Forms.Form.ActiveForm
If frm IsNot Nothing Then
    If frm.Name = "Class185" Then
        If user.group = "管理" Then
            frm.controls("btnAdd").Enabled = True
            frm.controls("btnDelete").Enabled = True
            frm.controls("Button2").Enabled = True
            frm.controls("btnUserTable").Enabled = True
            frm.controls("btnRole").Enabled = True
            frm.controls("btnExtProperty").Enabled = True
            frm.controls("btnDefault").Enabled = True
            frm.controls("lstUsers").Enabled = True
            frm.controls("btnGroup").Enabled = True
            frm.controls("btnEdit").Enabled = True
           
           
        End If
    ElseIf frm.Name = "Class182" Then
        For Each c As object In frm.controls
            c.Enabled = True
        Next
    End If
End If


--  作者:大红袍
--  发布时间:2015/12/21 17:48:00
--  

你还是自己做用户管理吧。

 

http://www.foxtable.com/help/topics/2048.htm

 


--  作者:sf020cf
--  发布时间:2015/12/22 10:45:00
--  

用户问题解决 数值列显示统计就是不行


--  作者:大红袍
--  发布时间:2015/12/22 10:49:00
--  

 那你自己做一个,写到系统SystemIdle事件

 

Dim str1 As String = ""
Dim t As Table = CurrentTable

Str1 = Str1 & "计数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "标准差:" & t.Aggregate(AggregateEnum.Std, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "总体标准差:" & t.Aggregate(AggregateEnum.StdPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "方差:" & t.Aggregate(AggregateEnum.Var, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "总体方差:" & t.Aggregate(AggregateEnum.VarPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "


StatusBar.Message3 = str1