Exemple #1
0
        public dynamic GetCustomFieldsValueOptions(int accountId)
        {
            GetCustomFieldsValueOptionsRequest request = new GetCustomFieldsValueOptionsRequest()
            {
                AccountId = accountId
            };
            GetCustomFieldsValueOptionsResponse response = customFieldService.GetCustomFieldValueOptions(request);

            return(response.CustomFieldValueOptions);
        }
        public GetCustomFieldsValueOptionsResponse GetCustomFieldValueOptions(GetCustomFieldsValueOptionsRequest request)
        {
            Logger.Current.Verbose("Request received to get custom field value options for account with id: " + request.AccountId);
            GetCustomFieldsValueOptionsResponse response = new GetCustomFieldsValueOptionsResponse();

            Logger.Current.Verbose("Request received to get custom field value options");
            IEnumerable <FieldValueOption> customFieldsValueOptions = customFieldRepository.GetCustomFieldsValueOptions(request.AccountId);

            response.CustomFieldValueOptions =
                Mapper.Map <IEnumerable <FieldValueOption>, IEnumerable <CustomFieldValueOptionViewModel> >(customFieldsValueOptions);;
            return(response);
        }