public void AddTransferReferralAction(TransferReferralActionData data) { TransferReferralAction action = TransferReferralAction.Create(data, this); this.DirectSalesAgentId = data.ToDirectSalesAgentId; this.directSalesAgent = null; SendReferralEmailToProspect(); if (NotifyDemonstrator) { SendDemonstratorNotification(); } this.Store(); ((Demonstrator)DirectSalesAgent).UpdateReferralCount(); }
public void Assign() { if (this.DirectSalesAgentId.IsValid) { throw new ReferralAlreadyAssignedError(); } TransferReferralActionData data = new TransferReferralActionData(); IdType id = IdType.UNSET; FindReferral(ref id, true); data.ToDirectSalesAgentId = id; data.Comment = "Auto Assigned"; AddTransferReferralAction(data); }