Select Case e.DataCol.Name
Case "cgysID"
Dim drs = e.DataTable.Select("cgysID=\'" & e.NewValue & "\'")
Dim i As Integer = 1
For Each dr As DataRow In drs
dr("dqqs") = i
dr("zqs") = drs.count
i+=1
Next
Case "dqqs", "采购单位", "金额"
Dim dr As DataRow = DataTables("立项表").Find("采购单位=\'" & e.datarow("采购单位") & "\'")
If dr IsNot Nothing Then
If e.datarow("dqqs") = 1 Then
dr("第一期金额") = e.datarow("金额")
ElseIf e.datarow("dqqs") = 2 Then
dr("第二期金额") = e.datarow("金额")
End If
End If
End Select