|
|
@ -78,7 +78,8 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries |
|
|
GuidGenerator.Create(), |
|
|
GuidGenerator.Create(), |
|
|
code, |
|
|
code, |
|
|
displayText, |
|
|
displayText, |
|
|
description |
|
|
description, |
|
|
|
|
|
CurrentTenant.Id |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
return await _dataDictionaryRepository.InsertAsync(entity); |
|
|
return await _dataDictionaryRepository.InsertAsync(entity); |
|
|
@ -124,13 +125,13 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public async Task<DataDictionary> SetStatus( |
|
|
public async Task<DataDictionary> SetStatus( |
|
|
Guid dataDictionaryId, |
|
|
Guid dataDictionaryId, |
|
|
Guid dataDictionayDetailId, |
|
|
Guid dataDictionaryDetailId, |
|
|
bool isEnabled) |
|
|
bool isEnabled) |
|
|
{ |
|
|
{ |
|
|
var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); |
|
|
var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); |
|
|
if (entity == null) |
|
|
if (entity == null) |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); |
|
|
var detail = entity.Details.FirstOrDefault(e => e.Id == dataDictionayDetailId); |
|
|
var detail = entity.Details.FirstOrDefault(e => e.Id == dataDictionaryDetailId); |
|
|
if (null == detail) |
|
|
if (null == detail) |
|
|
{ |
|
|
{ |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailExist); |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailExist); |
|
|
@ -145,7 +146,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public async Task<DataDictionary> UpdateDetailAsync( |
|
|
public async Task<DataDictionary> UpdateDetailAsync( |
|
|
Guid dataDictionaryId, |
|
|
Guid dataDictionaryId, |
|
|
Guid dataDictionayDetailId, |
|
|
Guid dataDictionaryDetailId, |
|
|
string displayText, |
|
|
string displayText, |
|
|
string description, |
|
|
string description, |
|
|
int order) |
|
|
int order) |
|
|
@ -153,7 +154,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries |
|
|
var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); |
|
|
var entity = await _dataDictionaryRepository.FindByIdAsync(dataDictionaryId); |
|
|
if (entity == null) |
|
|
if (entity == null) |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryNotExist); |
|
|
var detail = entity.Details.FirstOrDefault(e => e.Id == dataDictionayDetailId); |
|
|
var detail = entity.Details.FirstOrDefault(e => e.Id == dataDictionaryDetailId); |
|
|
if (null == detail) |
|
|
if (null == detail) |
|
|
{ |
|
|
{ |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailNotExist); |
|
|
throw new DataDictionaryDomainException(DataDictionaryManagementErrorCodes.DataDictionaryDetailNotExist); |
|
|
@ -161,7 +162,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries |
|
|
|
|
|
|
|
|
detail.UpdateDetail |
|
|
detail.UpdateDetail |
|
|
( |
|
|
( |
|
|
dataDictionayDetailId, |
|
|
dataDictionaryDetailId, |
|
|
displayText, |
|
|
displayText, |
|
|
description, |
|
|
description, |
|
|
order |
|
|
order |
|
|
@ -201,7 +202,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <param name="id"></param>
|
|
|
/// <param name="id"></param>
|
|
|
/// <returns></returns>
|
|
|
/// <returns></returns>
|
|
|
public async Task DeleteDictinaryTypeAsync(Guid id) |
|
|
public async Task DeleteDataDictionaryTypeAsync(Guid id) |
|
|
{ |
|
|
{ |
|
|
var entity = await _dataDictionaryRepository.FindByIdAsync(id); |
|
|
var entity = await _dataDictionaryRepository.FindByIdAsync(id); |
|
|
if (entity == null) |
|
|
if (entity == null) |
|
|
|