以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 这段代码有什么错? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=105533) |
||||
-- 作者:旭日生 -- 发布时间:2017/8/22 0:39:00 -- 这段代码有什么错? 想通过“DataColChanged"表事件,从“FILENAME”字段获得“yema”数据,但不显示数据,得不到结果。刚学习,求指导。 If e.DataCol.Name = "FILENAME" AndAlso e.DataRow.IsNull("FILENAME") = False Then Dim FN As String = e.DataRow("FILENAME") Dim YM As String = e.DataRow("yema") Select Case FN Case "FM.jpg" YM = "0" Case "BKB.jpg" YM = "0" Case "ML.jpg" YM = "0" Case Else YM = FN.trim(".jpg") End Select End If
|
||||
-- 作者:旭日生 -- 发布时间:2017/8/22 0:43:00 -- If e.DataCol.Name = "FILENAME" AndAlso e.DataRow.IsNull("FILENAME") = False Then Dim FN As String = e.DataRow("FILENAME") Dim YM As String = e.DataRow("yema") Select Case FN Case "FM.jpg" YM = "0" Case "BKB.jpg" YM = "0" Case "ML.jpg" YM = "0" Case Else YM = FN.trim(".jpg") End Select End If
|
||||
-- 作者:有点蓝 -- 发布时间:2017/8/22 8:53:00 -- Select Case FN Case "FM.jpg","BKB.jpg","ML.jpg". YM = "0" Case Else YM = FN.Replace(".jpg","") End Select e.DataRow("yema") = YM
|