以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  关于表达式列的问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=75824)

--  作者:大红袍
--  发布时间:2015/10/15 15:02:00
--  

 简单判断一下

 

Dim drs As List(of DataRow) = DataTables("时间").Select("选择 = True")
For Each dr As DataRow In drs
    Dim dr1 As DataRow = DataTables("月").AddNew
    For Each dc As DataCol In DataTables("月").DataCols
        If dc.Expression = "" Then
            dr1(dc.Name) = dr(dc.Name)
        End If
    Next
Next

 

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

 

严谨的判断

 

Dim dc As DataCol  = DataTables("表C").DataCols("c")
Dim pi As System.Reflection.PropertyInfo = dc.Gettype.getproperty("IsTemporary",Reflection.BindingFlags.nonpublic Or Reflection.BindingFlags.Instance)
output.show( pi.getvalue(dc,Nothing))