以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]复制 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=158299) |
-- 作者:江南小镇 -- 发布时间:2020/11/14 22:11:00 -- [求助]复制 老师,我要把代码放到计划管理中,每个月能自动复制一次数据。 Dim nma() As String = {"编号","日期_起始","项目名称","分摊费_月","分摊_月","合同编号","凭证名称","凭证号码","项目类别","来源","商品ID" } \'A表数据来源列 Dim nmb() As String = {"编号","日期","项目名称","金额","数量","合同编号","票据名称","票据编号","项目类别","来源","商品ID" } \'B表数据接收列 e.DataRow.save Dim dr2 As DataRow = DataTables("支出").Find("编号 = \'" & e.DataRow("编号") & "\'") \'找到指定返回的行 If dr2 Is Nothing Then dr2 = DataTables("支出").AddNew End If For i As Integer = 0 To nma.Length - 1 dr2(nmb(i)) = e.DataRow(nma(i)) dr2("单位") = "月" Next
|
-- 作者:有点蓝 -- 发布时间:2020/11/15 20:20:00 -- 把计时器间隔设置为:1000*60*60*24,即86400000秒,一天,然后在计划管理判断当前日期如果是1号就执行上面的代码 |
-- 作者:江南小镇 -- 发布时间:2020/11/16 6:26:00 -- 老师,下面代码不会写,谢谢老师帮忙啊,谢谢! 判断当前日期如果是1号就执行上面的代码
|
-- 作者:有点蓝 -- 发布时间:2020/11/16 8:31:00 -- 学这么多年都学啥了? if date.today.day = 1 then 执行其它代码 end if
|
-- 作者:江南小镇 -- 发布时间:2020/11/16 23:16:00 -- 老师,下面代码报错。 |
-- 作者:有点蓝 -- 发布时间:2020/11/17 8:31:00 -- 计划管理没有e参数,不要闭着眼睛用 |
-- 作者:江南小镇 -- 发布时间:2020/11/19 4:52:00 -- 老师,计划管理没有e参数怎样修改 \'Dim nma() As String = {"编号","日期_起始","项目名称","分摊费_月","分摊_月","合同编号","凭证名称","凭证号码","项目类别","来源","商品ID" } \'A表数据来源列 \'Dim nmb() As String = {"编号","日期","项目名称","金额","数量","合同编号","票据名称","票据编号","项目类别","来源","商品ID" } \'B表数据接收列 \'e.DataRow.save \'Dim dr2 As DataRow = DataTables("支出").Find("编号 = \'" & e.DataRow("编号") & "\'") \'找到指定返回的行 \'If dr2 Is Nothing Then \'dr2 = DataTables("支出").AddNew \'End If \'For i As Integer = 0 To nma.Length - 1 \' dr2(nmb(i)) = e.DataRow(nma(i)) \' dr2("单位") = "月" \'Next |
-- 作者:有点蓝 -- 发布时间:2020/11/19 8:52:00 -- 要复制哪一行的数据,当前选中的行? |
-- 作者:江南小镇 -- 发布时间:2020/11/24 6:37:00 -- 老师,怎样把下面的代码做成按钮代码。 Dim nma() As String = {"编号","日期_起始","项目名称","分摊费_月","分摊_月","合同编号","凭证名称","凭证号码","项目类别","来源","商品ID" } \'A表数据来源列 Dim nmb() As String = {"编号","日期","项目名称","金额","数量","合同编号","票据名称","票据编号","项目类别","来源","商品ID" } \'B表数据接收列 e.DataRow.save Dim dr2 As DataRow = DataTables("支出明细").Find("编号 = \'" & e.DataRow("编号") & "\'") \'找到指定返回的行 If dr2 Is Nothing Then dr2 = DataTables("支出明细").AddNew End If For i As Integer = 0 To nma.Length - 1 dr2(nmb(i)) = e.DataRow(nma(i)) dr2("单位") = "月" Next
|
-- 作者:有点蓝 -- 发布时间:2020/11/24 8:42:00 -- 要复制哪一行的数据,当前选中的行? |