Пример #1
0
        public static bool validateMemberProfileModel(VLCMemberProfileModel MemberProfileModel)
        {
            var validationResults = new List <ValidationResult>();
            //validate MemberProfileModel
            var  validationContext = new ValidationContext(MemberProfileModel, serviceProvider: null, items: null);
            bool isValid           = System.ComponentModel.DataAnnotations.Validator.TryValidateObject(MemberProfileModel, validationContext, validationResults, true);

            return(isValid);
        }
Пример #2
0
 public bool UpdateVlcMemberProfile(VLCMemberProfileModel profile)
 {
     if (VLCMemberProfileValidation.validateMemberProfileModel(profile))
     {
         int currentUserMemberId = _asaMemberAdapter.GetMemberIdFromContext();
         profile.MemberID = currentUserMemberId;
         return(_asaMemberAdapter.UpdateVlcProfile(profile));
     }
     return(false);
 }
Пример #3
0
 public static VLCUserProfileContract ToDataContract(this VLCMemberProfileModel profile)
 {
     return(new VLCUserProfileContract()
     {
         MemberID = profile.MemberID,
         EnrollmentStatus = profile.EnrollmentStatus,
         GraduationDate = profile.GraduationDate,
         AdjustedGrossIncome = profile.AdjustedGrossIncome,
         FamilySize = Convert.ToByte(profile.FamilySize),
         RepaymentStatus = profile.RepaymentStatus,
         StateOfResidence = profile.StateOfResidence,
         TaxFilingStatus = profile.TaxFilingStatus
     });
 }
Пример #4
0
 /// <summary>
 /// Updates or creates the member VLC profile.
 /// </summary>
 /// <param name="profile">The vlc profile to update.</param>
 /// <returns></returns>
 public bool UpdateVlcProfile(VLCMemberProfileModel profile)
 {
     return(SaltServiceAgent.UpdateVlcProfile(profile.ToDataContract()));
 }
Пример #5
0
 //TODO change this to accept VLCMemberProfile model
 public bool UpdateVlcProfile(VLCMemberProfileModel profile)
 {
     throw new NotImplementedException();
 }