--
这样行吗?蓝怎么
Tables("绩效明细").StopRedraw
If Tables("设置").GetCheckedRows.count = 0 Then
MessageBox.Show("请选中要导入的行,再导入数据","温馨提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
Else
Dim str As String = ""
For Each r As Row In Tables("设置").GetCheckedRows
str = str & ",\'" & r("姓名") & "\'"
Next
str = str.Trim(",")
If DataTables("绩效明细").Find("姓名 in (" & str & ")") IsNot Nothing Then
MessageBox.Show("导入数据重复,请核对!","温馨提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
End If
For Each r As Row In Tables("设置").GetCheckedRows
Dim r1 As Row = Tables("绩效明细").AddNew
r1("姓名") = r("姓名")
Next
Tables("绩效明细").ResumeRedraw
If MessageBox.Show("你已导入人员信息,请开始计算绩效工资","提示",MessageBoxButtons.OK,MessageBoxIcon.None) = DialogResult.OK Then
DataTables("绩效明细").DataCols("姓名").RaiseDataColChanged()
DataTables("绩效明细").DataCols("姓名").RaiseDataColChanged()
Forms("导入窗口").Close
End If