LoadUserInformation vago de estática público (username da corda)
{
Engodo de SqlConnection = SqlConnection novo (GetConnectionString ());
Cmd de SqlCommand = SqlCommand novo (“sp”, engodo);
cmd.CommandType = CommandType.StoredProcedure;
cmd. Parameters.AddWithValue (“@UserName”, username);
engodo. Abrir ();
Dr. de SqlDataReader = cmd.ExecuteReader (CommandBehavior.CloseConnection);
se (Dr. Lido ())
{
UserID = Convert.ToInt32 (Dr. [“UserID”] .ToString ());
FacilityID = Convert.ToInt32 (Dr. [“FacilityID”] .ToString ());
Admin = Convert.ToBoolean (Dr. [“Admin”] .ToString ());
Email = Dr. [“email”] .ToString ();
}
Dr. Fim ();
engodo. Fim ();
}
|