Filling a BO by a permission key


Author
Message
rmoore
rmoore
StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)StrataFrame Beginner (25 reputation)
Group: Forum Members
Posts: 21, Visits: 84
I have two business objects, LocationsBO and CreditMemosBO. I fill the LocationsBO by a permission key. If the permission is deny I remove the row from the current datatable. Once this LocationsBO is filled, I have all the locations a user has access to. What I want to do is to be able to fill the CreditMemosBO by the LocationIDs that are in the LocationsBO (CreditMemosBO has a foreign key LocationID). I was thinking of using this:



For Each LocationRow As DataRow In loLocations.CurrentDataTable.Rows

For Each CMrow As DataRow In Me.CurrentDataTable.Rows

If SecurityBasics.CurrentUser.GetPermission(LocationRow("RBSPermissionKey").ToString).Action = PermissionAction.Deny Then



If LocationRow("LocationID").Equals(CMrow("LocationID")) Then

MessageBox.Show("removing " & LocationRow("LocationName").ToString)

CMrow.Delete()

End If

End If

Next

Next





but it doesn't work. Is there a better way of filling a second BO based on permissions of a different BO? I could put a permission key in the CreditMemosBO but I don't want the extra overhead of inserting a permission key when a record is added.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search