Dim dr As DataRow = e.DataRow Select Case e.DataCol.Name Case "进货数量", "进货成本", "今日零售建议价" If dr.IsNull("进货数量") OrElse dr.IsNull("进货成本") OrElse dr.IsNull("今日零售建议价") Then dr("今日收入") = Nothing Else dr("今日收入") = dr("进货数量") * (dr("今日零售建议价") - dr("进货成本")) End If