Foxtable(狐表)用户栏目专家坐堂 → [求助]列条件求助


  共有1926人关注过本帖平板打印复制链接

主题:[求助]列条件求助

帅哥哟,离线,有人找我吗?
jyh7081
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:960 积分:8478 威望:0 精华:0 注册:2012/10/3 13:25:00
[求助]列条件求助  发帖心情 Post By:2017/5/11 9:33:00 [只看该作者]

窗口表的类型Normal,有两段代码:

 

1、指定"AAAA"列,执行代码(或者换一种方式:遍历列后,如果列属性是数值型,那么... )
Dim t As Table = CurrentTable  

If t.Cols.Name = "AAAA" Then   

    Syscmd.Edit.SerialFill()    '序列填充
Else
     ......
End If

 

--------------------------------------------------------------------

2、如果窗口表的“保存历史”列的逻辑值为false,那么清除数据
If e.Form.Controls("Table1").Cols("保存历史") = False Then

Dim dt As DataTable = DataTables("AAAA")
For Each dr As DataRow In dt.datarows
    For Each dc As DataCol In dt.datacols
        If dc.Expression = "" Then
            dr(dc.name) = Nothing
        End If
    Next
Next
End If

 

请老师指教!谢谢!


 回到顶部