partial void DeletefamilyMemberDetail(familyMemberDetail instance);
partial void UpdatefamilyMemberDetail(familyMemberDetail instance);
private void detach_familyMemberDetails(familyMemberDetail entity) { this.SendPropertyChanging(); entity.personaldetail = null; }
partial void InsertfamilyMemberDetail(familyMemberDetail instance);
public personaldetail copyPersonalDetail(personaldetail detail) { detail.name = name.Text; detail.surname = surname.Text; detail.title= titleList.Text; detail.gender = genderList.Text; detail.nric = nric.Text; detail.nationality = nationalityList.Text; detail.nationalityothers = nationalityOthers.Text; if ((datepicker.Text != null) && (datepicker.Text != "")) { detail.datepicker = datepicker.Text; } else detail.datepicker = ""; detail.maritalstatus= maritalList.SelectedValue; detail.address = address.Text; detail.employmentstatus = employmentList.SelectedValue; detail.occupation = occupation.Text; detail.companyname = companyName.Text; detail.contactnumber = contactNumber.Text; detail.contactnumberoffice = contactNumberOffice.Text; detail.contactnumberhp = contactNumberHp.Text; detail.contactnumberoffice = contactNumberOffice.Text; detail.contactnumberhp = contactNumberHp.Text; detail.contactnumberfax = contactNumberFax.Text; detail.email = emailId.Text; detail.issmoker = smokerList.Text; detail.educationlevel = educationList.SelectedValue; detail.medicalcondition = medicalList.SelectedValue; detail.medicalconditiondetails = medicalConditions.Text; detail.nominee = nomineeList.SelectedValue; detail.will = willList.SelectedValue; detail.familyDetailsRequired = FamilyDetailsRequired.SelectedValue; string spokenLang = ""; if (spokenLanguageOptions.Items[0].Selected == true) { spokenLang += "0"; spokenLang += ","; } if (spokenLanguageOptions.Items[1].Selected == true) { spokenLang += "1"; spokenLang += ","; } if (spokenLanguageOptions.Items[2].Selected == true) { spokenLang += "2"; spokenLang += ","; } if (spokenLanguageOptions.Items[3].Selected == true) { spokenLang += "3"; spokenLang += ","; } if (spokenLanguageOptions.Items[4].Selected == true) { spokenLang += "4"; } detail.spokenLanguage = spokenLang; detail.spokenLanguageOtherstxt = spokenLanguageOtherstxt.Text; string writtenLang = ""; if (writtenLanguageOptions.Items[0].Selected == true) { writtenLang += "0"; writtenLang += ","; } if (writtenLanguageOptions.Items[1].Selected == true) { writtenLang += "1"; writtenLang += ","; } if (writtenLanguageOptions.Items[2].Selected == true) { writtenLang += "2"; writtenLang += ","; } if (writtenLanguageOptions.Items[3].Selected == true) { writtenLang += "3"; writtenLang += ","; } if (writtenLanguageOptions.Items[4].Selected == true) { writtenLang += "4"; } detail.writtenLanguage = writtenLang; detail.writtenLanguageOtherstxt = writtenLanguageOtherstxt.Text; detail.accompanyQuestion = accompanyQuestion.Text; detail.trustedIndividualName = TrustedIndividualName.Text; detail.clientRelationship = ClientRelationship.Text; detail.NRICAccompany = NRICAccompany.Text; //detail.noAccompaniedIndividualReason = NoAccompaniedIndividualReason.Text; int noofmember = 0; if (membernumber.Value != "") { noofmember = Int16.Parse(membernumber.Value); } EntitySet<familyMemberDetail> membersList = new EntitySet<familyMemberDetail>(); if ((noofmember > 0) && (FamilyDetailsRequired.SelectedValue == "1")) { for (int i = 1; i <= noofmember; i++) { if (Request.Form["membername-" + i] != null) { familyMemberDetail member = new familyMemberDetail(); member.name = Request.Form["membername-" + i]; member.occupation = Request.Form["memberoccupation-" + i]; member.relationship = Request.Form["memberrel-" + i]; if ((Request.Form["memberyrssupport-" + i] != null) && (Request.Form["memberyrssupport-" + i] != "")) member.yrstosupport = Int16.Parse(Request.Form["memberyrssupport-" + i]); member.dob = Request.Form["datepicker-" + i]; if (Request.Form["monthlyIncome-" + i] != null && Request.Form["monthlyIncome-" + i] != "") { member.monthlyIncome = Request.Form["monthlyIncome-" + i]; } else { member.monthlyIncome = "0"; } membersList.Add(member); } } detail.familyMemberDetails = membersList; } if (detail.accompanyQuestion == "0") { detail.trustedIndividualName = ""; detail.clientRelationship = ""; detail.NRICAccompany = ""; } return detail; }