Example #1
0
        public ApasStudentView ConvertStudent(BCStudent input)
        {
            ApasStudentView output = new ApasStudentView();

            output.BirthDate = input.BirthDate;
            output.ContactHome = input.ContactHome;
            output.ContactMobile = input.ContactMobile;
            try
            {
                output.Country = input.GetCountry().Name;
            }
            catch (WebServiceException ex)
            {
                output.Country = "";
                bool rethrow = ExceptionPolicy.HandleException(ex, "GenericPolicy");
                if (rethrow) throw;
            }

            output.DateTerminated = input.DateTerminated;
            output.Email = input.Email;
            output.EnrolmentDate = input.EnrolmentDate;
            output.Friendster = input.Friendster;
            output.FullName = input.FullName;
            output.Gender = input.Gender;
            output.Guardian =
                ConvertGuardian(input.GetGuardian());
            output.Id = input.Id;
            output.IsActive = input.IsActive;
            output.MailingAddress = input.MailingAddress;
            output.NRIC = input.MailingAddress;
            output.PersonalURL = input.PersonalURL;
            output.PostalCode = input.PostalCode;
            output.Remark = input.Remark;
            try
            {
                output.School = input.GetSchool().Name;

            }
            catch (WebServiceException ex)
            {
                output.School = "";
                bool rethrow = ExceptionPolicy.HandleException(ex, "GenericPolicy");
                if (rethrow) throw;
            }

            return output;
        }