以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  DrawCell  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=130101)

--  作者:zoyong
--  发布时间:2019/1/13 15:39:00
--  DrawCell

窗口AfterLoad代码:

\'绘制  (样式名称,背景色,字体色)

DataTables(e.Form.name & "_table1").AddUserStyle("取消投标", Color.White, Color.Purple)



窗口DrawCell代码:


If e.Row("取消投标") = True Then         \'标记列
    e.Style = "取消投标"
    Dim fnt As New Font("宋体",10,FontStyle.Strikeout)       ‘删除线
    CurrentTable.Font = fnt
End If

红色代码,表中全部行都显示了
只想显示e.Row("取消投标") = True的行,怎么改
[此贴子已经被作者于2019/1/13 15:51:57编辑过]

--  作者:y2287958
--  发布时间:2019/1/13 16:30:00
--  
判断一下列名
--  作者:zoyong
--  发布时间:2019/1/13 17:26:00
--  
帮忙写一下具体代码,判断列名,好像没有效果


--  作者:有点甜
--  发布时间:2019/1/13 21:19:00
--  

窗口AfterLoad代码

 

DataTables(e.Form.name & "_table1").AddUserStyle("取消投标", Color.White, Color.Purple)
DataTables(e.Form.name & "_table1").Styles("取消投标").FontStrikeout = True


--  作者:zoyong
--  发布时间:2019/1/14 16:07:00
--  
 技术请教,很多表都有这个“项目名称”列
想在全局表中实现,怎么弄
判断表中有“项目名称”列,就运行MouseEnterCell,下面是代码:
If e.Col.Name = "项目名称" AndAlso e.Row.IsNull("项目名称") = False Then     \'显示所有内容
    e.Table.ShowToolTip(e.Row("项目名称"),e.Row,e.Col)
End If 


以下代码无效,求大神修改       全局表MouseEnterCell
If e.table.cols.contains("项目名称") then
If e.Col.Name = "项目名称" AndAlso e.Row.IsNull("项目名称") = False Then     \'显示所有内容
    e.Table.ShowToolTip(e.Row("项目名称"),e.Row,e.Col)
End If
End If 

--  作者:有点甜
--  发布时间:2019/1/14 16:23:00
--  

开启全部表事件。

 

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

 


--  作者:zoyong
--  发布时间:2019/1/18 15:09:00
--  
‘同步数据,以下代码无效    SQL表    没有绑定表名
    If Result = DialogResult.Yes Then
        \'复制数据到在建项目
        Dim cmd As New SQLCommand
        Dim nm As String  = r("立项编号")
        Dim dt As DataTable
        Dim Cols1() As String = {"项目名称","立项编号","简码","资质","区域"}  \'原数据
        Dim Cols2() As String = {"项目名称","立项编号","简码","资质","区域"}  \'目标数据
        cmd.C
        cmd.CommandText = "SELE CT * From {JY_投标立项} Where 立项编号 = \'" & nm & "\'"
        If cmd.ExecuteScalar > 0 Then
            Messagebox.Show("已经存在相同项目名称","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
            Exit Function
        End If
        dt = cmd.ExecuteReader()
        For Each dr1 As DataRow In dt.DataRows
            Dim dr2 As DataRow = DataTables("XM_在建项目").AddNew()
            For i As Integer = 0 To Cols1.Length -1
                dr2(Cols2(i)) = dr1(Cols1(i))
            Next
        Next
        r("中标") = True
        r.Save
        s.Dmessage("提示", "操作 【中标项目登记成功】!",getimage("Tools_正确.png"),5,"")
    End If
[此贴子已经被作者于2019/1/18 15:10:38编辑过]

--  作者:有点甜
--  发布时间:2019/1/18 15:14:00
--  
请具体说明问题,什么无效?实例发上来测试。
--  作者:zoyong
--  发布时间:2019/1/22 19:34:00
--  
Dim cmd As New SQLCommand
Dim dt As DataTable
cm d.connec tion Name = "主数据源"
cmd.CommandText = "S ELECT * From {XM_在建项目}"
dt = cmd.ExecuteReader()
DataTables("XM_在建项目").LoadFilter = ""

说是不存在这个表,求解
[此贴子已经被作者于2019/1/22 19:35:43编辑过]

--  作者:有点蓝
--  发布时间:2019/1/22 20:14:00
--  
如果这个表没有加载的,直接操作dt即可