以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]限制列输入数据问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=78406) |
-- 作者:cqlwsam -- 发布时间:2015/12/8 18:46:00 -- [求助]限制列输入数据问题 如截图,但某个患者(PatientsID)在表中已经有条记录,且联系信息(是否)已选中。在新增记录后,如何限制“联系信息”列不能在进行选择。谢谢! |
-- 作者:cqlwsam -- 发布时间:2015/12/8 20:16:00 -- XXX代表patientsID列吗?我的代码过不了。 |
-- 作者:大红袍 -- 发布时间:2015/12/8 20:27:00 -- If e.Col.Name = "联系信息" Then Dim pdr As DataRow = e.Table.DataTable.Find("xxx = \'" & e.Row("xxx") & "\' And 联系信息 = true") If pdr IsNot Nothing Then e.Cancel = True End If End If |
-- 作者:cqlwsam -- 发布时间:2015/12/8 21:13:00 -- 代码过不了,代码如下: If e.Col.Name = "联系信息" Then Dim pdr As DataRow = e.Table.DataTable.Find("patientsID = \'" & e.DataRow("patientsID") & "\' And 联系信息 = true") If pdr IsNot Nothing Then e.Cancel = True End If End If 提示:
|
-- 作者:大红袍 -- 发布时间:2015/12/8 21:32:00 -- If e.Col.Name = "联系信息" Then
Dim pdr As DataRow = e.Table.DataTable.Find("patientsID = \'" & e.Row("patientsID") & "\' And 联系信息 = true")
If pdr IsNot Nothing Then
e.Cancel = True
End If
End If
|
-- 作者:cqlwsam -- 发布时间:2015/12/8 22:35:00 -- 谢谢。对了。 |