public tblstudentfamily GetStudFamilyUpdate(int familyId) { tblstudentfamily studentFamily = (from p in svmContext.tblstudentfamily where p.IsDeleted == false && p.StudentFamilyId == familyId select p).FirstOrDefault(); return(studentFamily); }
public void UpdateFamilyBackground(int familyId, int relationshipId, string citizenship, string religion, string address, string telNo, string mobileNo, string eMail, string occupation, string employerBizAddress, string lastSchoolAttended, string yearGraduated, string educationalAttainment, string name) { tblstudentfamily tblStudentFamily = GetStudFamilyUpdate(familyId); tblStudentFamily.RelationshipId = relationshipId; tblStudentFamily.Citizenship = citizenship; tblStudentFamily.Religion = religion; tblStudentFamily.Address = address; tblStudentFamily.TelNo = telNo; tblStudentFamily.MobileNo = mobileNo; tblStudentFamily.eMail = eMail; tblStudentFamily.Occupation = occupation; tblStudentFamily.EmployerBizAddress = employerBizAddress; tblStudentFamily.LastSchoolAttended = lastSchoolAttended; tblStudentFamily.YearGraduated = yearGraduated; tblStudentFamily.EducationalAttainment = educationalAttainment; tblStudentFamily.Name = name; svmContext.SaveChanges(); }