private void OnSetCourseRegistrations(object sender, RoutedEventArgs e)
        {
            if (this._lv_UserList.SelectedItem == null)
            {
                return;
            }

            ejsUserInfo u = null;

            if (this._lv_UserList.SelectedItem is mngCourseRegistration)
            {
                mngCourseRegistration cr = this._lv_UserList.SelectedItem
                                           as mngCourseRegistration;

                u = cr.UserInfoObject;
            }
            else
            {
                u = this._lv_UserList.SelectedItem as ejsUserInfo;
            }

            if (u != null)
            {
                this.SetCourseRegistrationsForUser(u);
            }
        }
        private void PrepareOperationCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Cancelled == false &&
                e.Error == null)
            {
                multiplAsyncResultStruct mr = (multiplAsyncResultStruct)e.Result;

                if (mr.courseRegistrationsArray != null &&
                    mr.userInfoArray != null)
                {
                    ObservableUserList l =
                        App.Current.Resources["CompleteUsersList"] as ObservableUserList;

                    l.Clear();

                    ObservableCourseRegistrationList r =
                        App.Current.Resources["CompleteCourseRegistrationsList"] as ObservableCourseRegistrationList;

                    r.Clear();

                    for (int i = 0; i < mr.userInfoArray.Length; i++)
                    {
                        l.Add(mr.userInfoArray[i]);
                    }

                    //Slow. Refactor...
                    for (int j = 0; j < mr.courseRegistrationsArray.Length; j++)
                    {
                        for (int i = 0; i < mr.userInfoArray.Length; i++)
                        {
                            if (mr.userInfoArray[i].Id == mr.courseRegistrationsArray[j]._userId)
                            {
                                mngCourseRegistration mrr = new mngCourseRegistration()
                                {
                                    EjsCourseRegistrationObject = mr.courseRegistrationsArray[j],
                                    UserInfoObject = mr.userInfoArray[i]
                                };

                                r.Add(mrr);
                            }
                        }
                    }
                }
            }

            this.IsStageReady = true;
            this._isStageBusy = false;

            this.RaiseAsyncOperationCompletedEvent();
        }