老师:您好! 我后来在[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