If User.Group = "行政" Or User.name = "开发者" If CurrentTable.name.contains("模具保养") For Each r As Row In Tables("生产模数统计").rows Dim NY As String = r("年") & r("月") If NY.length = 5 NY = r("年") & "0" & r("月") Else NY = r("年") & r("月") End If If r("模具型号") = "" Else Dim contains As Boolean = False For Each dr As DataRow In DataTables("模具保养").DataRows If dr("年月") = NY If dr("模具型号") = r("模具型号") dr("本月生产") = r("生产模数") contains = True Exit For End If End If Next If contains = False Then Dim dr1 As DataRow dr1 = DataTables("模具保养").AddNew() dr1("模具型号") = r("模具型号") dr1("本月生产") = r("生产模数") End If End If Next End If End If
|