offentlig statisk elektricitet utan laga kraft LoadUserInformation (stränga userName),
{
SqlConnection lurar = nya SqlConnection (GetConnectionString ());
SqlCommand cmd = nya SqlCommand (”sp”, lurar);
cmd.CommandType = CommandType.StoredProcedure;
cmd. Parameters.AddWithValue (”@UserName”, userName);
lura. Öppna ();
SqlDataReader dr = cmd.ExecuteReader (CommandBehavior.CloseConnection);
om (dr. Läst ())
{
UserID = Convert.ToInt32 (dren [”UserID”] .ToString ());
FacilityID = Convert.ToInt32 (dr [”FacilityID”] .ToString ());
Admin = Convert.ToBoolean (dren [”Admin”] .ToString ());
E-post = dr [”e-posten”] .ToString ();
}
dr. Nära ();
lura. Nära ();
}
|