protected bool LogReferral(long affiliateId, string referrerUrl) { var aff = Affiliates.Find(affiliateId); if (aff != null && aff.Enabled && aff.Approved) { var r = new AffiliateReferral(); r.AffiliateId = aff.Id; r.ReferrerUrl = referrerUrl; return(AffiliateReferrals.Create(r)); } return(false); }
private bool LogReferral(long affiliateId, string referrerUrl) { Contacts.Affiliate aff = Affiliates.Find(affiliateId); if (aff == null) { return(false); } if (!aff.Enabled) { return(false); } AffiliateReferral r = new AffiliateReferral(); r.AffiliateId = aff.Id; r.ReferrerUrl = referrerUrl; return(AffiliateReferrals.Create(r)); }