Let's say the administrator wants to assign a role to a user. I have a dialog box with two dropdown lists, one each for users and for roles. The admin selects a user and a role and clicks a button to assign the role to the user...pretty much the same as in PTracker; however, I want to perform a check against all previous assignments to verify this one doesn't exist prior to attempting to persist it to the database.
Where RolesDepartments is concerned, I'm attempting to assign a role to a department. I have a sproc that selects a user and determines if that user's role has access to a certain department. So, if I want to see if the user is an estimator in the electrical department, I execute a statement such as: bool isPermitted = IsPermitted("estimator", "electrical"); and it returns a true or false for isPermitted.
albruan:Let's say the administrator wants to assign a role to a user. I have a dialog box with two dropdown lists, one each for users and for roles. The admin selects a user and a role and clicks a button to assign the role to the user...pretty much the same as in PTracker; however, I want to perform a check against all previous assignments to verify this one doesn't exist prior to attempting to persist it to the database.
albruan:Where RolesDepartments is concerned, I'm attempting to assign a role to a department. I have a sproc that selects a user and determines if that user's role has access to a certain department. So, if I want to see if the user is an estimator in the electrical department, I execute a statement such as: bool isPermitted = IsPermitted("estimator", "electrical"); and it returns a true or false for isPermitted.
That doesn't sound like you're assigning a role to a department, it sounds like you're checking that the user has a role and is a member of a particular department. In that sense, a department would be a role in and of itself (semantically, not necessarly stored that way in your db, but your BOs could make it appear as though departments are roles).
At any rate, forget your db for the moment and design objects to acomplish the tasks in your use cases. Then worry about how they will get or store the relevent data.Copyright (c) Marimer LLC