Example #1
0
        private void MemberEnrollmentsGetCompleted(Object sender, Server.Application.MemberEnrollmentsGetCompletedEventArgs e)
        {
            serverRequests.Remove("MemberEnrollments");

            GlobalProgressBarHide("MemberEnrollments");

            GlobalProgressBarHide("CurrentEnrollment");

            if ((!e.Cancelled) && (e.Error == null) && (e.Result != null))
            {
                memberEnrollments = Converters.ServerCollectionToClient.MemberEnrollmentCollection(Application, e.Result.Collection);

                foreach (MemberEnrollment currentMemberEnrollment in memberEnrollments)
                {
                    if ((DateTime.Today >= currentMemberEnrollment.EffectiveDate) && (DateTime.Today <= currentMemberEnrollment.TerminationDate))
                    {
                        currentEnrollment = currentMemberEnrollment;

                        break;
                    }
                }

                NotifyPropertyChanged("Enrollments");

                NotifyPropertyChanged("CurrentEnrollment");
            }

            return;
        }
Example #2
0
        public MemberEnrollment Enrollment(Int64 enrollmentId)
        {
            MemberEnrollment enrollment = null;

            foreach (MemberEnrollment currentEnrollment in Enrollments)
            {
                if (currentEnrollment.Id == enrollmentId)
                {
                    enrollment = currentEnrollment; break;
                }
            }

            return(enrollment);
        }