I have used this code for login form in C# Windows Form application. also, I have created functions for different roles. How to get user role to main menu form and start run the