If e.DataCol.Name = "存款金额" Then
If e.DataRow.IsNull("存款客户") = False AndAlso e.DataRow.IsNull("客户ID") = False Then
Dim dt As Date = Date.Now
Dim r2 As DataRow = DataTables("UserYE").Find("客户ID = \'" & e.DataRow("客户ID") & "\'")
If r2 IsNot Nothing Then \'如果不为空,则在原来的数量上加上新的数量
r2("客户余额") = r2("客户余额") + e.DataRow("存款金额")
r2("更新日期") = dt
r2.Save
Else
Dim r3 As Row = Tables("UserYE").AddNew \'否则新增一行
r3("客户ID") = e.DataRow("客户ID")
r3("客户名称") = e.DataRow("存款客户")
r3("客户余额") = e.DataRow("存款金额")
r3("更新日期") = dt
r3.Save
End If
End If