Select Case e.DataCol.Name Case "员工编号" Dim pr As DataRow = e.DataRow.GetParentRow("汇总表") If e.NewValue Is Nothing Then e.DataRow("提成") = Nothing Else If pr IsNot Nothing Then e.DataRow("提成") = pr("提成") If e.OldValue <> e.NewValue Then DataTables("汇总表").DataCols("员工编号").RaiseDataColChanged(pr) End If End If End If If e.OldValue IsNot Nothing AndAlso e.OldValue <> e.NewValue Then pr = DataTables("汇总表").Find("[员工编号] = '" & e.OldValue & "'") If pr IsNot Nothing Then DataTables("汇总表").DataCols("员工编号").RaiseDataColChanged(pr) End If End If Case "销量","违约处罚","清帐","提成" If e.OldValue <> e.NewValue Then Dim pr As DataRow = e.DataRow.GetParentRow("汇总表") If pr IsNot Nothing Then DataTables("汇总表").DataCols("员工编号").RaiseDataColChanged(pr) End If End If End Select
|