比如
txt = b
old = a
r("授权模块“) = a,c,d,e,f
以下代码 If ("," & old & ",").Contains("," & r("授权模块") & ",") Then 在判定却是为false的,请问问题在哪里?
Dim txt As String = e.Form.Controls("替换模块").Value
Dim old As String = e.Form.Controls("授权模块").Value
If old IsNot Nothing Then
If txt IsNot Nothing Then
If Tables("0107角色授权_Table1").Rows.Count > 0 Then
For Each r As Row In Tables("0107角色授权_Table1").Rows
If ("," & old & ",").Contains("," & r("授权模块") & ",") Then
r("授权模块") = r("授权模块").Replace(old,txt)
r.save
Else
MessageBox.Show("角色名为【" & r("角色名") & "】未找到授权模块,无法完成替换,请知悉!","温馨提示")
End If
Next
Else
MessageBox.Show("清单中未有数据,请确认之后再操作,谢谢!","温馨提示")
Return
End If
Else
MessageBox.Show("请选择您需要替换后模块的名称,谢谢!","温馨提示")
End If
Else
MessageBox.Show("请选择您需要替换模块的名称,谢谢!","温馨提示")
End If