Public Sub InitializeMenuItems()
Dim booFound As Boolean
For Each ii As ToolStripMenuItem In MainMenuStrip.Items
For Each obj As Object In ii.DropDownItems
If TypeOf (obj) Is ToolStripMenuItem Then
Dim item As ToolStripMenuItem = DirectCast(obj, ToolStripMenuItem)
If item.Tag IsNot Nothing Then
booFound = False
For Each row As DataRow In ACLCore.Login.GetCSRPermissions(h.CSRLoginID, h.lai).Tables(0).Rows
If CInt(row("SecurityPermissionID")) = CInt(item.Tag) Then
booFound = True
Exit For
End If
Next
If Not booFound Then
item.Enabled = False
End If
End If
End If
Next
Next
End Sub