C
C#15mo ago
Ivan

❔ authorization windows form MsSql

i am new to c#, i want to do authorization for windows forms application through mysql with roles. If the login is successful, on the next form, for example, one button should be hidden, but no matter how I tried, I didn’t change the conditions, the button does not disappear. The photo shows if in the line “id_organizer” - 1 - there will be two buttons, if 2 - then one there will be no button. It seems that the conditions are set correctly, but nothing comes out ...
6 Replies
JakenVeina
JakenVeina15mo ago
the button does not disappear
Where are you instructing any buttons to disappear? All I see is an instruction to sometimes disable button2
Ivan
Ivan15mo ago
if the state is "m", then only one button is shown, isn't it?
SG97
SG9715mo ago
and how are button1_Click and Dashboard_Load related
JakenVeina
JakenVeina15mo ago
no, both buttons are shown one is disabled based on the code you've shown
SG97
SG9715mo ago
.Visible is the property you're looking for
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.