Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.NET Security, Roles?
Message
De
10/02/2004 15:31:41
 
 
À
10/02/2004 15:16:41
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00875536
Message ID:
00876020
Vues:
17
You are the best. Thank you. I am so new to all of this and help like you have provided keeps me going. Hats off to you.

Cheers,
Neil


>Sure, it's a work in progress and a little rough around the edges but this is the basic method...HTH.
>
>
     /// <summary>
>     /// Returns a boolean indicating whether or not the user is an Admin User
>     /// </summary>
>		public bool CheckAdminUser(int UserPK)
>		{
>			// Get a reference to the data access object
>			mmDataAccessBase dao = this.GetDataAccessObject();
>
>			// Create the parameter and set the direction
>			IDbDataParameter param1 = dao.CreateParameter("@UserPK", UserPK);
>			param1.Direction = ParameterDirection.Input;
>			
>			// Call the stored procedure and pass the parameter
>			IDbCommand cmd;			
>			object retval = this.ExecSprocScalar("ssAPI_CheckAdminUser",out cmd, param1);
>
>			if (retval != null)
>			{
>						
>				if (retval.ToString() == "Administrator")
>				{
>					// admin user
>					return true;
>				}
>				else
>				{
>					// not an admin user
>					return false;
>				}
>			}
>			else
>
>				// not an admin user
>				return false;
>						
>		}
>
>>Hi Kendall,
>>
>>This all looks like just what I need. Can I get a look at the Bizobj class that contains the method CheckAdminUser() please?
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform