I have the following scenario: a program I made has three type of user accounts: superuser, administrator and consultant.
The login forms works well and through a method I can get the type of the user and open the respective main form of said user.
The problem is this: there are some forms that the users share. But, I don't know how to have the application know which of the three main forms it must return depending of the user.
Question is: there is a way for keep the value (user type) from the login form and use it on the other forms?
Here is how I get the value of type in the database:
public string sacartipo()
{string tipo = "";
username = usuario.Text;
obj.Usuario = usuario.Text;
password = contra.Text;
obj.Contrasena = contra.Text;
tipo = obj.Logeo(username, password);
return tipo; //This is the variable that stores the type of user.
}