Select e.DataCol.Name
Case "客户名称","实收费"
If e.DataRow.Isnull("客户名称") = False Then
Dim Sum As Double
Sum = DataTables("主合同").SQLCompute("Sum(实收费)", "客户名称 = '" & e.DataRow("客户名称") & "' and _Identify <> " & e.DataRow("_Identify"))
If Sum + e.DataRow("实收费") >= 2000 Then
Dim dr As DataRow
dr = DataTables("客户").SQLFind("客户名称 = '" & e.DataRow("客户名称") & "'")
If dr IsNot Nothing
If dr("VIP") = False Then
dr("VIP") = True
dr.Save
e.DataRow.save
dr = DataTables("客户").Find("客户名称 = '" & e.DataRow("客户名称") & "'")
If dr IsNot Nothing Then dr.Load
End If
End If
End If
End If
End Select
[此贴子已经被作者于2018/1/20 9:56:10编辑过]