Exemplo n.º 1
0
		private void loginButton_Click(object sender, EventArgs e)
		{
			string username = UserNameTextBox.Text;
			string password = PassWordTextBox.Text;
            PermissionManager pm = new PermissionManager(Program.Context.Database);
            ICollection<string> permissions = pm.getUserPermissions(username, password);
            if(permissions != null)
            {
				Program.Context.UserLogin = username;
				Program.Context.UserPassword = password;
				Program.Context.UserRoles = permissions;
                Program.Context.InterfaceManager.buildInterface();
            }
            else
            {
				Program.Context.FormManager.showMessageBox("Podałeś zły login i/lub hasło");
            }
		}
Exemplo n.º 2
0
		public void setUpAll()
		{
			pm = new PermissionManager(SzpifDatabase.DataBase);
		}