I have a windows application in C#. An application may have multiple Users with some Roles assigned to them and multiple forms. What we want is to restrict a logged in user according to his role.
i.e for e.g. Admin is free to allowed to view all form there is all button Click in frmhome with the application, while some other users operator login may not be allowed to view some forms.eg.form1,form2 not view operator, not click button1 ,button2 . (my all form name is frmhome, form1,form2,form3,form4,form5 & frmhome form there are multiple buttons,
eg button1(form1),button2(form2),button3(form3),button4(form4),button5 (form5)if i click the button1 then open form1 . if role assign to view form1 to user.
in Mysql database all field username,password,form1sel,form2Sel.
if I register usernm :admin,password:admin,form1sel:yes.form2sel:yes save then open form1,form2 and I register usernm :operator,password:operator,form1sel:yes.form2sel:no save then open only form1 button onclick , not view/open form2 on button click
What I have tried:
I have try some code, when I login as operator then form1 not open on button click as I expect result.but when I login another user i.e admin then not open form1 I want click on form1 button then open form1.