private bool FindReferral(ref IdType id, bool forceNew) { if (!forceNew) { IReferral recycled = FindByEmail(); if (recycled != null) { id = recycled.DirectSalesAgentId; return(true); } recycled = FindByGeocode(); if (recycled != null) { id = recycled.DirectSalesAgentId; return(true); } } DirectSalesAgentList list = FindReferrals(this.Latitude, this.Longitude); if (list.Count > 0) { IdType x = IdType.UNSET; for (int i = 0; i < list.Count; i++) { x = list[i].DirectSalesAgentId; if (!x.Equals(this.DirectSalesAgentId)) { break; } } id = x; } return(false); }