Sharepoing2010の簡単な誕生日カレンダーのWebパーツを作成しています。
サイトのすべてのユーザーを繰り返し処理し、その日に誕生日を迎えたユーザーを表示する必要があります。ユーザーを名前のアルファベット順に表示する必要があります。
ilkeを実行すると、ユーザーリストを反復処理できます。
SPSite currentSite = ...
ServerContext ospServerContext = ServerContext.GetContext(currentSite);
UserProfileManager ospUserProfileManager = new UserProfileManager(ospServerContext);
foreach (UserProfile ospUserProfile in ospUserProfileManager) { ... }
ただし、プロファイルの順序を制御することはできません。いくつかの簡単なルールでプロファイルを並べ替える組み込みの方法はありますか、またはDictionary(string、UserProfile)を作成し、UserProfileManagerから入力し、キーで並べ替えてから、メンバーに対してforeachを実行する必要がありますか?
ありがとう!