继续完成邮件功能

This commit is contained in:
2025-09-13 19:39:18 +08:00
parent 42aaf9c01b
commit 58c9340640
6 changed files with 449 additions and 51 deletions

View File

@@ -86,19 +86,20 @@ namespace DMS.WPF.ViewModels.Dialogs
IsActive = IsActive
};
EmailTemplateDto resultTemplate;
if (_isEditMode)
{
await _emailAppService.UpdateEmailTemplateAsync(_templateId, template);
resultTemplate = await _emailAppService.UpdateEmailTemplateAsync(_templateId, template);
_notificationService.ShowSuccess("邮件模板更新成功");
}
else
{
await _emailAppService.CreateEmailTemplateAsync(template);
resultTemplate = await _emailAppService.CreateEmailTemplateAsync(template);
_notificationService.ShowSuccess("邮件模板创建成功");
}
CloseRequested?.Invoke(true);
await Close(new EmailTemplateDto());
await Close(resultTemplate);
}
catch (Exception ex)
{