I am creating an interface where I manage my users'rights. For almost all options there is no problem as these are just bools.
But in that case, I want to add option to allow user to edit or not a list of operations.
- Administrator can Add/Remove list of operations that need to be managed in the software from another interface.
- For User's rights to edit operations, I save the list of operations'ID (the ones he can edit) in a List
I want to :
- Display a list of textboxes, corresponding to the list of operations managed.
- When I display the window, I check if my user's 'ListEditableOperations' field contains or not Operation's ID.
- When I check/uncheck a textbox I need to update the 'ListEditableOperations' field
I use MVVM(even if I am new on it), and I don't see where to start as in that case, I don't know how many TextBoxes there will be, and cannot use "OnPropertyChanged"?
I also read there is a possibility to make a ListBox of CheckBoxes, but in that case how am I supposed to fill the checkboxes, as condition will be check if this.User.ListEditableOperations.Contains(SelectedCheckBox.ID)
Aucun commentaire:
Enregistrer un commentaire