public static BOContact GetByUserID(long userID) { logger.Trace("GetByUserID"); BOContact BusinessObject = null; SqlConnection con = new SqlConnection(GetConnectionString()); con.Open(); try { SqlCommand cmd = new SqlCommand("P_Contact_GetByUserID", con); cmd.CommandType = CommandType.StoredProcedure; SetInt64Parameter(cmd.Parameters, "@userID", userID, false); SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.SingleResult); try { if (rdr.Read()) { BusinessObject = new BOContact(rdr); return BusinessObject; } } finally { rdr.Close(); } } finally { con.Close(); } return BusinessObject; }
public BOContactComparer(BOContact.Columns column, BOContact.SortDirections direction) { _column = column; _direction = direction; }