http://foxtable.com/bbs/dispbbs.asp?boardid=2&Id=145239,看4楼实例Select e.DataCol.Name
Case "日期"
If e.DataRow.IsNull("日期") Then
e.DataRow("编号") = Nothing
Else
Dim dr As DataRow = DataTables("号表").Find("编号 is not null and 表名='订单'", "编号")
If dr IsNot Nothing Then
e.DataRow("编号") = dr("编号")
dr.Delete
DataTables("号表").save
Else
Dim rt As String = QQClient.SendWait(":f" & e.DataTable.Name & "f:")
e.DataRow("编号") = rt
End If
End If
Case "编号"
If e.NewValue Is Nothing AndAlso e.OldValue IsNot Nothing Then
Dim dr1 As DataRow = DataTables("号表").Find("表名 ='订单' and 编号 ='" & e.OldValue & "'")
If dr1 Is Nothing Then
dr1 = DataTables("号表").AddNew
dr1("表名") = "订单"
dr1("编号") = e.OldValue
dr1.save
End If
End If
End Select
问题一:日期列的值的改变,没触编号列生成编号的值?
问题二:红代码,没报错,也没执行,无法实现回收使用
的编号,如果有旧编号用旧编号,没旧编号,新生成编号,跨月,旧编号不能用,只能新编号