public HistoryCategoryDto CreateHistoryCategory([FromBody] CreateListItemCategoryRequestDto inDto)
        {
            var title       = inDto.Title;
            var description = inDto.Description;
            var sortOrder   = inDto.SortOrder;
            var imageName   = inDto.ImageName;

            if (!(_crmSecurity.IsAdmin))
            {
                throw _crmSecurity.CreateSecurityException();
            }

            if (string.IsNullOrEmpty(title))
            {
                throw new ArgumentException();
            }

            var listItem = new ListItem
            {
                Title            = title,
                Description      = description,
                SortOrder        = sortOrder,
                AdditionalParams = imageName
            };

            listItem.ID = _daoFactory.GetListItemDao().CreateItem(ListType.HistoryCategory, listItem);
            _messageService.Send(MessageAction.HistoryEventCategoryCreated, _messageTarget.Create(listItem.ID), listItem.Title);

            return(_mapper.Map <HistoryCategoryDto>(listItem));
        }
        public TaskCategoryDto CreateTaskCategory(
            [FromBody] CreateListItemCategoryRequestDto inDto)
        {
            if (!(_crmSecurity.IsAdmin))
            {
                throw _crmSecurity.CreateSecurityException();
            }

            var listItem = new ListItem
            {
                Title            = inDto.Title,
                Description      = inDto.Description,
                SortOrder        = inDto.SortOrder,
                AdditionalParams = inDto.ImageName
            };

            listItem.ID = _daoFactory.GetListItemDao().CreateItem(ListType.TaskCategory, listItem);
            _messageService.Send(MessageAction.CrmTaskCategoryCreated, _messageTarget.Create(listItem.ID), listItem.Title);

            return(_mapper.Map <TaskCategoryDto>(listItem));
        }