示例#1
0
        public bool Create(Chart entity)
        {
            var result = _chartRepository.Create(entity);

            if (result)
            {
                //依赖于字段
                _dependencyService.Create(entity);
                //本地化标签
                _localizedLabelService.Create(entity.SolutionId, entity.Name.IfEmpty(""), ChartDefaults.ModuleName, "LocalizedName", entity.ChartId, _appContext.BaseLanguage);
                _localizedLabelService.Create(entity.SolutionId, entity.Description.IfEmpty(""), ChartDefaults.ModuleName, "Description", entity.ChartId, _appContext.BaseLanguage);
            }
            return(result);
        }