public member GetParent(int childID, int parentID) { record = myRecords.FirstOrDefault(e => e.ChildID == childID && e.ParentID == parentID); var parent = context.members.FirstOrDefault(e => e.Status == "Active" && e.memberID == record.ParentID); return(parent); }
public void DeleteRecord(childparent record) { using (churchdatabaseEntities context = new churchdatabaseEntities()) { // myRecords.Remove(record); childparent aRecord = context.childparents.FirstOrDefault(e => e.ChildParentID == record.ChildParentID); context.childparents.Remove(aRecord); context.SaveChanges(); } }
public bool HasParent(int childID, int parentID) { record = myRecords.FirstOrDefault(e => e.ChildID == childID && e.ParentID == parentID); if (record == null) { return(false); } else { return(true); } }
public bool AddRecord(childparent Record) { myRecords.Add(record); return(true); }