private static void UpdateMembershipData(ref UserProfile profiledata, MembershipData data) { profiledata.MembershipDatas.Where(q => q.MDID == data.MDID).FirstOrDefault().Association = data.Association; profiledata.MembershipDatas.Where(q => q.MDID == data.MDID).FirstOrDefault().MembershipID = data.MembershipID; profiledata.MembershipDatas.Where(q => q.MDID == data.MDID).FirstOrDefault().MembershipType = data.MembershipType; profiledata.MembershipDatas.Where(q => q.MDID == data.MDID).FirstOrDefault().MembershipYear = data.MembershipYear; profiledata.MembershipDatas.Where(q => q.MDID == data.MDID).FirstOrDefault().ValidUpto = data.ValidUpto; }
private void AddMemberShipData(ref UserProfile profiledata, MembershipData membership) { MembershipData md = new MembershipData(); md = membership; md.UPID = profiledata.UPID; md.MDID = Convert.ToString(Guid.NewGuid()); profiledata.MembershipDatas.Add(md); }
private static UserProfile GenerateProfileData(UserProfileData userProfile, string email) { UserProfile profile = new UserProfile(); profile.UPID = Convert.ToString(Guid.NewGuid()); profile.email = email; if (userProfile.personalData != null) { PersonalData pd = new PersonalData(); pd = userProfile.personalData; pd.UPID = profile.UPID; pd.PDID = Convert.ToString(Guid.NewGuid()); profile.PersonalDatas.Add(pd); } if (userProfile.qualificationData != null) { QualificationData qd = new QualificationData(); foreach (var qualification in userProfile.qualificationData) { qd = qualification; qd.UPID = profile.UPID; qd.QDID = Convert.ToString(Guid.NewGuid()); profile.QualificationDatas.Add(qd); } } if (userProfile.fileData != null) { FileData fd = new FileData(); fd.UPID = profile.UPID; fd.FID = Convert.ToString(Guid.NewGuid()); profile.FileDatas.Add(fd); } if (userProfile.technicalSkillData != null) { foreach (var technicalSkill in userProfile.technicalSkillData) { TechnicalSkillData tsd = new TechnicalSkillData(); tsd = technicalSkill; tsd.UPID = profile.UPID; tsd.TSDID = Convert.ToString(Guid.NewGuid()); profile.TechnicalSkillDatas.Add(tsd); } } if (userProfile.functionalSkillData != null) { foreach (var functionalSkill in userProfile.functionalSkillData) { FunctionalSkillData fsd = new FunctionalSkillData(); fsd = functionalSkill; fsd.UPID = profile.UPID; fsd.FSDID = Convert.ToString(Guid.NewGuid()); profile.FunctionalSkillDatas.Add(fsd); } } if (userProfile.certificationData != null) { foreach (var certification in userProfile.certificationData) { CertificationData cd = new CertificationData(); cd = certification; cd.UPID = profile.UPID; cd.CDID = Convert.ToString(Guid.NewGuid()); profile.CertificationDatas.Add(cd); } } if (userProfile.trainingData != null) { foreach (var training in userProfile.trainingData) { TainingData td = new TainingData(); td = training; td.UPID = profile.UPID; td.TDID = Convert.ToString(Guid.NewGuid()); profile.TainingDatas.Add(td); } } if (userProfile.EmployerData != null) { foreach (var employerData in userProfile.EmployerData) { EmployerData ed = new EmployerData(); ed = employerData; ed.UPID = profile.UPID; ed.EDID = Convert.ToString(Guid.NewGuid()); profile.EmployerDatas.Add(ed); } } if (userProfile.MemberShipData != null) { foreach (var membershipData in userProfile.MemberShipData) { MembershipData md = new MembershipData(); md = membershipData; md.UPID = profile.UPID; md.MDID = Convert.ToString(Guid.NewGuid()); profile.MembershipDatas.Add(md); } } if (userProfile.insuranceData != null) { InsuranceData id = new InsuranceData(); id = userProfile.insuranceData; id.UPID = profile.UPID; id.IDID = Convert.ToString(Guid.NewGuid()); profile.InsuranceDatas.Add(id); } if (userProfile.additionalData != null) { AdditionalData ad = new AdditionalData(); ad = userProfile.additionalData; ad.UPID = profile.UPID; ad.ADID = Convert.ToString(Guid.NewGuid()); profile.AdditionalDatas.Add(ad); } return(profile); }