private void GetMediumSourceByUtm()
        {
            string utmMediumValue   = bpmHrefParameters["utm_medium"];
            string utmSourceValue   = bpmHrefParameters["utm_source"];
            string utmCampaignValue = bpmHrefParameters["utm_campaign"];
            Guid   leadMediumId     = Guid.Empty;
            Guid   leadSourceId     = Guid.Empty;

            if (!string.IsNullOrEmpty(utmMediumValue))
            {
                var leadMediumEntity = LeadMediumCode.Find("Code", utmMediumValue);
                if (leadMediumEntity != null)
                {
                    leadMediumId = leadMediumEntity.GetTypedColumnValue <Guid>("LeadMediumId");
                }
            }
            if (!string.IsNullOrEmpty(utmSourceValue) || !string.IsNullOrEmpty(utmCampaignValue))
            {
                var searchValue          = !string.IsNullOrEmpty(utmSourceValue) ? utmSourceValue : utmCampaignValue;
                var LeadSourceCodeEntity = LeadSourceCode.Find("Code", searchValue);
                if (LeadSourceCodeEntity != null)
                {
                    leadSourceId = LeadSourceCodeEntity.GetTypedColumnValue <Guid>("LeadSourceId");
                    if (leadMediumId == Guid.Empty)
                    {
                        var leadSourceEntity = LeadSource.Find("Id", leadSourceId);
                        if (leadSourceEntity != null)
                        {
                            leadMediumId = leadSourceEntity.GetTypedColumnValue <Guid>("LeadMediumId");
                        }
                    }
                }
            }
            ResultLeadMediumId = leadMediumId;
            ResultLeadSourceId = leadSourceId;
        }
 public LeadMediumCode(LeadMediumCode source)
     : base(source)
 {
 }
 public LeadMediumCode(Terrasoft.Configuration.LeadMediumCode source)
     : base(source)
 {
     this.CopyEntityLookupProperties(source);
 }