public bool DeleteCommunicationRecord(GEDCOMCommunicationRecord commRec) { if (commRec == null) { return(false); } int num = fRecords.Count; for (int i = 0; i < num; i++) { GEDCOMRecord rec = this[i]; if (rec.RecordType == GEDCOMRecordType.rtResearch) { GEDCOMResearchRecord resRec = (GEDCOMResearchRecord)rec; for (int j = resRec.Communications.Count - 1; j >= 0; j--) { if (resRec.Communications[j].Value == commRec) { resRec.Communications.DeleteAt(j); } } } } DeleteRecord(commRec); return(true); }
public bool DeleteTaskRecord(GEDCOMTaskRecord taskRec) { if (taskRec == null) { return(false); } int num = fRecords.Count; for (int i = 0; i < num; i++) { GEDCOMRecord rec = this[i]; if (rec.RecordType == GEDCOMRecordType.rtResearch) { GEDCOMResearchRecord resRec = (GEDCOMResearchRecord)rec; for (int j = resRec.Tasks.Count - 1; j >= 0; j--) { if (resRec.Tasks[j].Value == taskRec) { resRec.Tasks.DeleteAt(j); } } } } DeleteRecord(taskRec); return(true); }
public bool DeleteResearchRecord(GEDCOMResearchRecord resRec) { if (resRec == null) { return(false); } DeleteRecord(resRec); return(true); }
public GEDCOMResearchRecord CreateResearch() { GEDCOMResearchRecord result = new GEDCOMResearchRecord(this, this, "", ""); result.InitNew(); result.ChangeDate.ChangeDateTime = DateTime.Now; AddRecord(result); return(result); }