Select Case e.DataCol.Name Case "人工费","机械费","材料费","独立土石方" dim dr as datarow=e.DataRow Dim dc As DataRow Dim filter As String filter = "项目名称 = '" & dr("项目名称") & "'and 工程名称 = '" & dr("工程名称") & "'" dc = DataTables("工程概况").Find(filter) If dr("独立土石方")=True Then dr("管理费")=(dr("人工费")+dr("机械费"))*dc("独立土石方费率_管理费率")/100 end if End Select