示例#1
0
        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);
        }
示例#2
0
 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();
     }
 }
示例#3
0
 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);
     }
 }
示例#4
0
 public bool AddRecord(childparent Record)
 {
     myRecords.Add(record);
     return(true);
 }