Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Security and Web Forms
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01171423
Message ID:
01171504
Vues:
8
>How do I block usage on a form level depending on your role?

This is how I've done it:
mmUser boUser = new mmUser();
mmRole boRoles = new mmRole();
DataSet dsRoles = boRoles.GetUserRoles(this.SecurityUserPk);
bool AllowAccess = false;
foreach (DataRow dr in dsRoles.Tables[0].Rows)
{
	if (dr["description"].ToString() == "Administrator")
	{
		AllowAccess = true;
	}
}
Rip Ryness
International Falls, MN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform