Click here to Skip to main content
16,016,750 members

Comments by Ashutosh Dutondkar (Top 39 by date)

Ashutosh Dutondkar 1-Mar-16 8:58am View    
I tried inserting breakpoint on form load GlobalVariable.IsAdmin = True then first time after the click off Login Button its making the condition as,
GlobalVariable.IsAdmin = False but aftr closing the form and opening the same form again its not able to check condition and the condition is same as GlobalVariable.IsAdmin = True. Also if I try to keep condition GlobalVariable.IsAdmin = False first time its keeping it False only but after that being the condition is False then too the buttons are getting enable.
Ashutosh Dutondkar 29-Feb-16 14:11pm View    
I tried, but the condition is Still the same. Its checking only on Login button click.
I checked the condition on form load like GlobalVariable.IsAdmin = True but its not checking condition on form load. Still if employee logs in first time it checks the other time buttons are enabled
Ashutosh Dutondkar 29-Feb-16 13:25pm View    
I don't want two forms for ADMIN and EMPLOYEE. It should be checked on same form. I don;t have doubt in my code, because its working properly! Just I want to know how can i declare it globally! So I can check it on other forms! I have table in my database with columns username, password and type. Type has two rows "ADMIN" and "EMPLOYEE"
Ashutosh Dutondkar 29-Feb-16 12:54pm View    
But how should I implement my above code in the solution. I'm unable to do the coding. Please help me with the implementation of above code!
Ashutosh Dutondkar 29-Feb-16 10:36am View    
I have try doing above code. Its working all right but when form is Close and Open the Buttons are enable. I dont know how to declare global variables in VB.NET please help me with the code how to declare globally so I can use it on other fomrs as well.