国际化修改
This commit is contained in:
@@ -48,7 +48,8 @@ namespace IRaCIS.Application.Services
|
||||
var exp = new EntityVerifyExp<CRO>()
|
||||
{
|
||||
VerifyExp = cro => cro.CROName.Equals(addCroCompanyCommand.CROName) ,
|
||||
VerifyMsg = "已经存在同名的CRO,请确认。"
|
||||
//---已经存在同名的CRO,请确认。
|
||||
VerifyMsg = _localizer["CRO_DupName"]
|
||||
};
|
||||
|
||||
var cro = await _croRepository.InsertOrUpdateAsync(addCroCompanyCommand, true, exp);
|
||||
@@ -66,7 +67,8 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _trialRepository.AnyAsync(t => t.CROId == cROCompanyId))
|
||||
{
|
||||
return ResponseOutput.NotOk("该CRO已经参与项目,不能被删除。");
|
||||
//---该CRO已经参与项目,不能被删除。
|
||||
return ResponseOutput.NotOk(_localizer["CRO_InProject"]);
|
||||
}
|
||||
//if (_userRepository.Find().Any(t => t.OrganizationId == cROCompanyId))
|
||||
//{
|
||||
@@ -77,4 +79,4 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,12 +31,14 @@ namespace IRaCIS.Application.Services
|
||||
var exp = new EntityVerifyExp<Hospital>()
|
||||
{
|
||||
VerifyExp = h => h.HospitalName.Equals(hospitalCommand.HospitalName),
|
||||
VerifyMsg = "已经存在同名的医院,请确认。"
|
||||
//---已经存在同名的医院,请确认。
|
||||
VerifyMsg = _localizer["Hospital_DupName"]
|
||||
};
|
||||
|
||||
if (await _hospitalRepository.AnyAsync(x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前Site已经添加到其他Hospital了");
|
||||
//---当前Site已经添加到其他Hospital了
|
||||
throw new BusinessValidationFailedException(_localizer["Hospital_SiteAdded"]);
|
||||
}
|
||||
|
||||
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp);
|
||||
@@ -53,7 +55,8 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _doctorRepository.AnyAsync(t => t.Id == hospitalId))
|
||||
{
|
||||
return ResponseOutput.NotOk("该医院下已经注册有医生,不可以删除。");
|
||||
//---该医院下已经注册有医生,不可以删除。
|
||||
return ResponseOutput.NotOk(_localizer["Hospital_HasDoctors"]);
|
||||
}
|
||||
//if (_userRepository.Find().Any(t => t.OrganizationId == hospitalId))
|
||||
//{
|
||||
@@ -85,4 +88,4 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@ namespace IRaCIS.Application.Services
|
||||
var exp = new EntityVerifyExp<Site>()
|
||||
{
|
||||
VerifyExp = h => h.SiteName.Equals(siteCommand.SiteName) || h.SiteCode.Equals(siteCommand.SiteCode),
|
||||
VerifyMsg = "已经存在同名的中心,请确认。"
|
||||
//---已经存在同名的中心,请确认。
|
||||
VerifyMsg = _localizer["Site_DupName"]
|
||||
};
|
||||
|
||||
using (await _mutex.LockAsync())
|
||||
@@ -87,11 +88,12 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (await _trialSiteUserRepository.AnyAsync(t => t.SiteId == siteId))
|
||||
{
|
||||
return ResponseOutput.NotOk("该中心已经加入项目,不可以被删除。");
|
||||
//---该中心已经加入项目,不可以被删除。
|
||||
return ResponseOutput.NotOk(_localizer["Site_InProject"]);
|
||||
}
|
||||
|
||||
var success = await _siteRepository.BatchDeleteNoTrackingAsync(x => x.Id == siteId);
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ namespace IRaCIS.Application.Services
|
||||
var exp = new EntityVerifyExp<Sponsor>()
|
||||
{
|
||||
VerifyExp = h => h.SponsorName.Equals(sponsorCommand.SponsorName),
|
||||
VerifyMsg = "已经存在同名的申办方,请确认。"
|
||||
//---已经存在同名的申办方,请确认。
|
||||
VerifyMsg = _localizer["Sponsor_DupName"]
|
||||
};
|
||||
|
||||
var sponsor = await _sponsorRepository.InsertOrUpdateAsync(sponsorCommand, true, exp);
|
||||
@@ -68,7 +69,8 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _trialRepository.AnyAsync(t => t.CROId == sponsorId))
|
||||
{
|
||||
return ResponseOutput.NotOk("该申办方已经加入项目,不允许删除。");
|
||||
//---该申办方已经加入项目,不允许删除。
|
||||
return ResponseOutput.NotOk(_localizer["Sponsor_InProject"]);
|
||||
}
|
||||
//if (_userRepository.Find().Any(t => t.OrganizationId == sponsorId))
|
||||
//{
|
||||
@@ -80,4 +82,4 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user