Select Case e.DataCol.Name
Case "建筑物类别","小区名称","楼号","房号"
If e.DataRow.IsNull("小区名称") = False AndAlso e.DataRow.IsNull("楼号") = False
Dim dt As DataTable = DataTables(e.DataRow("建筑物类别") & "规格表")
Dim dr As DataRow
If e.DataRow("建筑物类别") = "安置房"
If e.DataRow.IsNull("房号") = False
dr = dt.Find("小区名称='" & e.DataRow("小区名称") & "' And 楼号= " & e.DataRow("楼号") & " And 房号=" & e.DataRow("房号"))
If dr IsNot Nothing Then
dr("是否已安置") = True
End If
End If
Else
dt.ReplaceFor("是否已安置",True,"小区名称='" & e.DataRow("小区名称") & "' And 楼号= '" & e.DataRow("楼号") & "'")
End If
End If
End Select