public IEnumerable <Contact> GetContacts(Segment segment, string criteria = "")
        {
            criteria = !string.IsNullOrEmpty(criteria) ? criteria : segment.Criteria;
            var _criteria = SegmentCriteriaService.GetSegmentCriteria().SingleOrDefault(x => x.Name == criteria);

            return(_criteria.GetContacts(segment));
        }
        public IEnumerable <CustomPropertyTab> GetCriteriaProps(string criteriaName)
        {
            var criteria = SegmentCriteriaService.GetSegmentCriteria().SingleOrDefault(x => x.Name == criteriaName);

            if (criteria != null)
            {
                return(GetCustomProps(docTypeAlias: criteria.ConfigDocType));
            }
            return(null);
        }
 public IEnumerable <string> GetCriteria()
 {
     return(SegmentCriteriaService.GetSegmentCriteria().Select(x => x.Name).ToList());
 }