以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]复制 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=194778) |
-- 作者:苏州老街 -- 发布时间:2025/1/13 20:13:00 -- [求助]复制 老师,下面代码会多复制一行(项目类别)的列。 Select Case e.DataCol.name Case "项目_类别","项目_明细","记录日期" If e.DataRow.IsNull("项目_类别") = False AndAlso e.DataRow.IsNull("项目_类别") = False AndAlso e.DataRow.IsNull("记录日期") = False Then If Cdate(e.DataRow("记录日期")).Year = Date.Today.Year Then Dim dr61 As DataRow = DataTables("年度支出项目类别统计").Find("项目类别 = \'" & e.DataRow("项目_类别") & "\' And 项目明细= \'" & e.DataRow("项目_明细") & "\' and 年份 =\'" & Date.Today.Year & "\'") If dr61 Is Nothing Then dr61 = DataTables("年度支出项目类别统计").AddNew dr61("项目类别") = e.DataRow("项目_类别") dr61("项目明细") = e.DataRow("项目_明细") dr61("年份") = Date.Today.Year End If End If End If End Select
|
-- 作者:有点蓝 -- 发布时间:2025/1/13 20:30:00 -- If e.DataRow.IsNull("项目_类别") = False AndAlso e.DataRow.IsNull("项目_明细") = False AndAlso e.DataRow.IsNull("记录日期") = False Then |
-- 作者:苏州老街 -- 发布时间:2025/1/13 21:29:00 -- 谢谢老师 |