国际化修改

This commit is contained in:
he
2023-05-05 10:04:15 +08:00
parent 18dfc3ca37
commit 97d5010f0c
8 changed files with 86 additions and 18 deletions
@@ -93,14 +93,16 @@ public static class FileStoreHelper
if (systemClinicalData == null || systemClinicalData.Path == string.Empty)
{
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, systemClinicalData.Path);
if (!System.IO.File.Exists(filePath))
{
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, systemClinicalData.FileName);
@@ -121,14 +123,16 @@ public static class FileStoreHelper
if (trialClinicalData == null|| trialClinicalData.Path==string.Empty)
{
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, trialClinicalData.Path);
if (!System.IO.File.Exists(filePath))
{
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, trialClinicalData.FileName);
@@ -143,14 +147,16 @@ public static class FileStoreHelper
if (doc == null)
{
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, doc.Path);
if (!System.IO.File.Exists(filePath))
{
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, doc.Name.Trim('/'));
@@ -42,7 +42,8 @@ public static class SendEmailHelper
catch (Exception ex)
{
throw new Exception("邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员");
//---邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员
throw new Exception(StaticData.International("SendEmail_SendFail"));
}
@@ -62,7 +63,8 @@ public static class SendEmailHelper
if (sMTPEmailConfig.ToMailAddressList.Count == 0)
{
throw new ArgumentException("没有收件人");
//---没有收件人
throw new ArgumentException(StaticData.International("SendEmail_NoRecipient"));
}
else
{