/// <summary> /// If the applicant is in the list, it deletes it. /// </summary> /// <param name="applicant">The applicant to be deleted.</param> public void DeleteRecord(Applicant applicant) { if (ApplicantList.IndexOf(applicant) != -1) { ApplicantList.Remove(applicant); } SaveToFile(); }
/// <summary> /// It inserts the applicant, if it's not already in the list. /// </summary> /// <param name="applicant">The applicant to be inserted.</param> public void InsertRecord(Applicant applicant) { if (ApplicantList.IndexOf(applicant) == -1) { ApplicantList.Add(applicant); } SaveToFile(); }
/// <summary> /// If the applicant is in the list, it deletes it. /// </summary> /// <param name="applicant">The applicant to be deleted.</param> public void DeleteRecord(Applicant applicant) { Debug.Assert(applicant != null); Debug.Assert(ApplicantList.IndexOf(applicant) != -1); if (ApplicantList.IndexOf(applicant) != -1) { ApplicantList.Remove(applicant); } SaveToFile(); }
/// <summary> /// It inserts the applicant, if it's not already in the list. /// </summary> /// <param name="applicant">The applicant to be inserted.</param> public void InsertRecord(Applicant applicant) { Debug.Assert(applicant != null); Debug.Assert(ApplicantList.IndexOf(applicant) == -1); if (ApplicantList.IndexOf(applicant) == -1) { ApplicantList.Add(applicant); } SaveToFile(); }