/// <summary> /// /// </summary> /// <param name="patient"></param> /// <returns></returns> public PatientDto searchPatient(PatientDto patient) { if (patient.ContactNo.Length <= 10) { if ((patientRepo.GetPatient(patient.ContactNo) == null) || (patientHelper.GetPatientByName(patient.Name) == null)) { System.Diagnostics.Debug.WriteLine("Patient not found"); return(null); } else { System.Diagnostics.Debug.WriteLine("Patient found"); } return(null); } else { System.Diagnostics.Debug.WriteLine("Invalid Contact Number"); throw new ArgumentNullException(); } }