예제 #1
0
        /// <summary>
        /// 添加数据类型分类
        /// </summary>
        /// <returns></returns>
        public async Task CreateDataTypeClass(DataTypeClassInput input)
        {
            DataTypeClassification classification = input.MapTo <DataTypeClassification>();

            classification.ClassId  = GenerateClassId(input.ParentClassId);
            classification.ParentId = input.ParentId;
            await _dataTypeClassRepository.InsertAsync(classification);
        }
예제 #2
0
        public async Task <IActionResult> AddDataTypeClass(DataTypeClassInput input)
        {
            int result = 0;

            try
            {
                await _dataTypeService.CreateDataTypeClass(input);
            }
            catch (System.Exception)
            {
                result = -1;
            }
            return(Json(result));
        }