If e.DataCol.Name = "审批状态"
If e.DataRow("审批状态") = "已审批完成" Then
Dim nma() As String = { "合同编码","项目编码","所属机构","项目类别","招标方式","项目名称","建设单位","合同金额","合同工期","项目经理","项目总工" } '合同签订数据来源列
Dim nmb() As String = { "合同编码","项目编码","所属机构","项目类别","招标方式","项目名称","建设单位","合同金额","合同工期","项目经理","项目总工" } '业绩管理数据接收列
e.DataRow.save
Dim dr As DataRow = DataTables("合同归档").sqlFind("项目编码 = '" & e.DataRow("项目编码") & "'") '找出合同编码相同的项目
If dr IsNot Nothing Then '如果找到的话
dr("合同编码") = e.DataRow("合同编码")
DataTables("合同归档") .save
Else
Dim dw As DataRow = DataTables("合同归档") .AddNew
For i As Integer = 0 To nma.Length - 1
dw(nmb(i)) = e.DataRow(nma(i))
Next
DataTables("合同归档") .save
End If
Else
'DataTables("合同归档").SQLdeletefor("合同编码 = '" & e.DataRow("合同编码") & "'")
'DataTables("合同归档").Save
End If
End If