以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 重置列 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=184547) |
-- 作者:朱女士 -- 发布时间:2022/12/13 13:32:00 -- 重置列 老师:您好! 我后来在[datacolchanged]里写的代码,写代码以前的列,数据没有更新,我重置列不执行,数据没有发生变化。怎么办?谢谢! elect e.DataCol.Name Case "清单条码编码", "ygdm", "gxdm", "开工时间", "结束时间" Dim qr As DataRow = e.DataRow Dim sp As TimeSpan Dim kcsj1, kcsj2, kcsj3 As Integer Dim KGSJ As DATETIME = RIGHT(qr("开工时间"), 8) Dim JSSJ As DATETIME = RIGHT(qr("结束时间"), 8) If qr.isnull("结束时间") = False Then If KGSJ < = #10:00# And JSSJ >= #10:10# Then kcsj1 = 10 If KGSJ < = #12:00# And JSSJ >= #12:40# Then kcsj2 = 40 If KGSJ < = #15:00# And JSSJ >= #15:10# Then kcsj3 = 10 sp = JSSJ - KGSJ qr("工序耗时") = sp.TotalSeconds() / 60 - kcsj1 - kcsj2 - kcsj3 Else qr("工序耗时") = Nothing End If End Select |
-- 作者:有点蓝 -- 发布时间:2022/12/13 13:56:00 -- 选中case里面任意一列,再点重置 |