以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 没有显示勾选和锁定 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=174774) |
||||
-- 作者:采菊东篱下 -- 发布时间:2022/2/2 19:13:00 -- 没有显示勾选和锁定 If Forms("主窗口").opened Then Dim qsmc As WinForm.ComboBox = Forms("主窗口").Controls("棋赛名称") Dim di1 As String = qsmc.Value If di1 = "" Then messagebox.show("请选择棋赛名称") Return End If Dim m As WinForm.TextBox = Forms("主窗口").Controls("第几轮") Dim di2 As String = m.Value If di2 = "" Then messagebox.show("请输入第几轮") Return End If Dim bslx As WinForm.TextBox = Forms("主窗口").Controls("bslx") Dim lx As String = bslx.Value Dim fz As WinForm.DropDownBox = Forms("主窗口").Controls("fenzhu") Dim Str As String = fz.Value If Forms("主窗口").Controls("fenzhu").text = "" Then messagebox.show("请选择分组") Return End If With Forms("主窗口").Controls("Table1").Table.DataTable Dim drs7 As List(of DataRow) = .SQLSelect("[团体赛或个人赛] = \'" & lx & "\' And [棋赛名称] = \'" & di1 & "\' And [第几轮比赛] = \'" & Cstr(Val(di2)-1) & "\' And [分组] = \'" & Str & "\' And ([比赛已结束] = False or [比赛已结束] is Null)") For Each dr7 As DataRow In drs7 If dr7 IsNot Nothing Then dr7("比赛已结束") = True dr7.Locked = True Else Return End If .Save() Next .Load .DataCols("比赛已结束").RaiseDataColChanged() Forms("主窗口").Controls("TextBox1").Value = 1 & "/" & .TotalPages End With With Tables("比赛积分") .AutoSizeCol("日期") .AutoSizeCol("操作人姓名") .Cols("备注").Width = 180 .AutoSizeRows() End With End If
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/5 11:33:00 -- 老毛病了,没有保存:http://www.foxtable.com/webhelp/topics/2901.htm |
||||
-- 作者:采菊东篱下 -- 发布时间:2022/2/6 8:15:00 -- 改为这样一样不行 If Forms("主窗口").opened Then Dim qsmc As WinForm.ComboBox = Forms("主窗口").Controls("棋赛名称") Dim di1 As String = qsmc.Value If di1 = "" Then messagebox.show("请选择棋赛名称") Return End If Dim m As WinForm.TextBox = Forms("主窗口").Controls("第几轮") Dim di2 As String = m.Value If di2 = "" Then messagebox.show("请输入第几轮") Return End If Dim bslx As WinForm.TextBox = Forms("主窗口").Controls("bslx") Dim lx As String = bslx.Value Dim fz As WinForm.DropDownBox = Forms("主窗口").Controls("fenzhu") Dim Str As String = fz.Value If Forms("主窗口").Controls("fenzhu").text = "" Then messagebox.show("请选择分组") Return End If With DataTables("比赛积分") \'With Forms("主窗口").Controls("Table1").Table.DataTable Dim drs As List(of DataRow) = .SQLSelect("[团体赛或个人赛] = \'" & lx & "\' And [棋赛名称] = \'" & di1 & "\' And [第几轮比赛] = \'" & Cstr(Val(di2)-1) & "\' And [分组] = \'" & Str & "\' And ([比赛已结束] = False or [比赛已结束] is Null)") For Each dr As DataRow In drs If drs IsNot Nothing Then dr("比赛已结束") = True dr.Locked = True Else Return End If Next .SQLUpdate(drs) .Load .DataCols("比赛已结束").RaiseDataColChanged() Forms("主窗口").Controls("TextBox1").Value = 1 & "/" & .TotalPages End With With Tables("比赛积分") .AutoSizeCol("日期") .AutoSizeCol("操作人姓名") .Cols("备注").Width = 180 .AutoSizeRows() End With End If
[此贴子已经被作者于2022/2/8 14:50:33编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/6 10:22:00 -- 有符合条件的数据吗? Dim drs As List(of DataRow) = .SQLSelect("[团体赛或个人赛] = \'" & lx & "\' And [棋赛名称] = \'" & di1 & "\' And [第几轮比赛] = \'" & Cstr(Val(di2)-1) & "\' And [分组] = \'" & Str & "\' And ([比赛已结束] = False or [比赛已结束] is Null)") msgbox(drs.count) dr.Locked = True 改为这样试试 dr("_Locked") = True
|
||||
-- 作者:采菊东篱下 -- 发布时间:2022/2/6 18:47:00 -- 也不行,肯定有符合条件的数据。 |
||||
-- 作者:采菊东篱下 -- 发布时间:2022/2/6 18:49:00 -- 你按照截图选项测试一下就知了。 |
||||
-- 作者:程兴刚 -- 发布时间:2022/2/6 20:23:00 -- Dim Str As String = fz.Value 将str 变量名称改一下,没有生儿子和亲叔叔同名的道理!
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/7 8:45:00 -- 3楼项目哪个窗口哪个按钮的代码? |
||||
-- 作者:采菊东篱下 -- 发布时间:2022/2/8 14:53:00 -- 3楼的项目我重传了一下,原3楼的文件跟未改前的同名,重传的文件并没更新为改后的文件,现在我把文件名改了重传,看锁定按钮的代码。 |
||||
-- 作者:有点蓝 -- 发布时间:2022/2/8 15:35:00 -- 没有符合条件的数据,自行输出条件核对 |