Case "数量","单价","销售类型","商品类别"
If e.DataRow.Isnull("数量") orelse e.DataRow.Isnull("单价") Then
e.DataRow("金额")=Nothing
Else
If e.DataRow("销售类型")= "普通销售" Then
e.DataRow("金额")=e.DataRow("单价")*e.DataRow("数量")
ElseIf e.DataRow("销售类型")= "会员销售" Then
Dim dr1 As DataRow
dr1 = DataTables("会员折扣表").Find("商品类别='" & e.DataRow("商品类别") & "'")
If dr1 IsNot Nothing Then
e.DataRow("折扣") = dr1("折扣")
Else
e.DataRow("折扣") = 1
End If
e.DataRow("金额")=e.DataRow("单价")*e.DataRow("数量")*e.DataRow("折扣")
End If
End If