I'm working on windows forms application. Recently, I get new requirements that I don't know how to approach.
- Users of the application will have one of two roles: Admin or User.
- Admin can set a list of instructions to do when encountering different situations.
- Normal users (User role), will get a pop-up window with the next instruction to do for a specific situation.
Instructions configured by Admin are like help or guides to normal and newbie users. So they know what to do next without bothering the supervisor (Admin).
For example, my application has two buttons: Button 1 and Button 2. Admin can input this of instructions:
- If Button 1 clicked => Message: "Click Button 2"
- If Button 2 clicked ==> Message: "Send email to xxx"
- If Button 2 clicked && time > midday => Message: "Click Button 1 first"
- If Button 2 clicked && time <= midday => Message: "Send email to yyy"
I just want to give a simple example to clarify things, but, in reality, I have to handle hundreds of cases to cover all situations.
I was thinking about creating a database table containning two columns:
However, I can not see:
What list of conditions an Admin can see while configuring
How to combine and save these conditions
How to match the
Conditionsstring column to a specific case at run-time
Any thoughts or suggestions how to approach this requirement?