以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  删除行需要输入密码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=51256)

--  作者:JPG7
--  发布时间:2014/5/22 19:24:00
--  删除行需要输入密码
表格在删除行时需要输入密码,避免恶意操作
--  作者:有点甜
--  发布时间:2014/5/22 19:26:00
--  

 参考

 

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

 

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

 


--  作者:JPG7
--  发布时间:2014/5/29 15:55:00
--  回复:(有点甜) 参考 http://www.fox...
图片点击可在新窗口打开查看会了
--  作者:JPG7
--  发布时间:2014/5/29 16:16:00
--  
以下是引用有点甜在2014-5-22 19:26:00的发言:

 参考

 

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

 

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

 

If user.IsRole("管理") = True Or user.name = "冯志明" Then
    If e.DataRow.IsNull("下单日期") = False  Then      
        Dim psd As String
        InputValue(psd,"验证","请输入密码") \'输入密码
        If psd <> "040610" Then \'如果密码正确
            e.Cancel = True
        End  If
    End If
Else
    e.Cancel = True
    MessageBox.Show("无权删除")
End If

这样写行不行?但是只能一次删除一行,删除多少行就需要输入多少次,怎么写,输入一次密码就可以把选定行全删除


--  作者:Bin
--  发布时间:2014/5/29 16:17:00
--  
这样的话要自己设计一个删除按钮,从按钮上去控制了
--  作者:有点甜
--  发布时间:2014/5/29 16:29:00
--  

 试试这样

 

static psd As String = ""

If user.IsRole("管理") = True Or user.name = "冯志明" Then
    If e.DataRow.IsNull("下单日期") = False  Then         
        If psd <> "040610" Then \'如果密码不正确
            InputValue(psd,"验证","请输入密码") \'输入密码
            If psd <> "040610" Then
                e.Cancel = True
            End If
        End  If
    End If
Else
    e.Cancel = True
    MessageBox.Show("无权删除")
End If


--  作者:JPG7
--  发布时间:2014/5/30 10:24:00
--  
以下是引用有点甜在2014-5-29 16:29:00的发言:

 试试这样

 

static psd As String = ""

If user.IsRole("管理") = True Or user.name = "冯志明" Then
    If e.DataRow.IsNull("下单日期") = False  Then         
        If psd <> "040610" Then \'如果密码不正确
            InputValue(psd,"验证","请输入密码") \'输入密码
            If psd <> "040610" Then
                e.Cancel = True
            End If
        End  If
    End If
Else
    e.Cancel = True


    MessageBox.Show("无权删除")
End If

static psd As String = ""这个什么意思啊,为什么这样就行图片点击可在新窗口打开查看


--  作者:Bin
--  发布时间:2014/5/30 10:25:00
--  
http://www.foxtable.com/help/topics/1061.htm
--  作者:JPG7
--  发布时间:2014/5/30 10:34:00
--  
以下是引用Bin在2014-5-30 10:25:00的发言:
http://www.foxtable.com/help/topics/1061.htm

谢谢BIN老师


--  作者:JPG7
--  发布时间:2014/5/30 10:52:00
--  
以下是引用有点甜在2014-5-29 16:29:00的发言:

 试试这样

 

static psd As String = ""

If user.IsRole("管理") = True Or user.name = "冯志明" Then
    If e.DataRow.IsNull("下单日期") = False  Then         
        If psd <> "040610" Then \'如果密码不正确
            InputValue(psd,"验证","请输入密码") \'输入密码
            If psd <> "040610" Then
                e.Cancel = True
            End If
        End  If
    End If
Else
    e.Cancel = True
    MessageBox.Show("无权删除")
End If

这样是删除选定区域了,但是,再删除其他的也不需要密码了,必须重启项目才行啊