以文本方式查看主题

-  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=127559)

--  作者:湛江智
--  发布时间:2018/11/16 16:06:00
--  [求助]窗口录入权限
打开窗口,表A 第一列 已<layer highlight="term-3" class="searchwp-term searchwp-highlight-searchwp-highlighting">存在</layer>数据,只有经理才能<layer highlight="term-4" class="searchwp-term searchwp-highlight-searchwp-highlighting">修改</layer>;表B 第二列 为空时,其他用户可以录入,保存后,就只有经理才能<layer highlight="term-4" class="searchwp-term searchwp-highlight-searchwp-highlighting">修改</layer>
代码怎么写,求助

--  作者:有点甜
--  发布时间:2018/11/16 16:12:00
--  

看帮助文档

 

http://www.foxtable.com/webhelp/scr/2255.htm

 

 


--  作者:湛江智
--  发布时间:2018/11/16 17:21:00
--  
这个看过,不满足想要的效果。想实现其他用户录入后,再打开窗口后,之前录入的不能修改,没录入的还可以录入
[此贴子已经被作者于2018/11/16 17:21:37编辑过]

--  作者:有点甜
--  发布时间:2018/11/16 17:44:00
--  
以下是引用湛江智在2018/11/16 17:21:00的发言:
这个看过,不满足想要的效果。想实现其他用户录入后,再打开窗口后,之前录入的不能修改,没录入的还可以录入
[此贴子已经被作者于2018/11/16 17:21:37编辑过]

 

你可以判断行的状态,如果是新增行,可以修改

 

http://www.foxtable.com/webhelp/scr/0428.htm

 


--  作者:湛江智
--  发布时间:2018/11/16 22:59:00
--  回复:(有点甜)以下是引用湛江智在2018/11/16 17:21...
 下面这样,有缺陷嘛?

Dim r As Row = Tables("表A").Current
If  r.DataRow.RowState = DataRowState.Unchanged Then
    e.Form.Controls("TextBox1").ReadOnly = BooleanEnum.False
Else
    e.Form.Controls("TextBox1").ReadOnly = BooleanEnum.True
End If

--  作者:有点蓝
--  发布时间:2018/11/16 23:12:00
--  
还是先去看看编程基础吧。基本的语法都还不会

Dim r As Row = Tables("表A").Current
If  r.DataRow.RowState = DataRowState.Unchanged Then
    e.Form.Controls("TextBox1").ReadOnly = BooleanEnum.True
Else
    e.Form.Controls("TextBox1").ReadOnly = BooleanEnum.False
End If