C
C#2y 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
JakenVeina2y 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
IvanOP2y ago
if the state is "m", then only one button is shown, isn't it?
SG97
SG972y ago
and how are button1_Click and Dashboard_Load related
JakenVeina
JakenVeina2y ago
no, both buttons are shown one is disabled based on the code you've shown
SG97
SG972y ago
.Visible is the property you're looking for
Accord
Accord2y 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.
Want results from more Discord servers?
Add your server