ทmark alet insignia

This commit is contained in:
Kittapath 2023-09-27 13:20:00 +07:00
parent b7027ebe55
commit 9692af553b
9 changed files with 16687 additions and 241 deletions

View file

@ -1,4 +1,5 @@
using BMA.EHR.Application.Common.Interfaces;
using BMA.EHR.Application.Messaging;
using BMA.EHR.Application.Responses;
using BMA.EHR.Application.Responses.Messages;
using BMA.EHR.Domain.Models.HR;
@ -17,16 +18,19 @@ namespace BMA.EHR.Application.Repositories.MessageQueue
private readonly IApplicationDBContext _dbContext;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly EmailSenderService _emailSenderService;
#endregion
#region " Constructor and Destuctor "
public NotificationRepository(IApplicationDBContext dbContext,
IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
EmailSenderService emailSenderService,
IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
{
_dbContext = dbContext;
_httpContextAccessor = httpContextAccessor;
_emailSenderService = emailSenderService;
}
#endregion
@ -130,19 +134,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue
}
if (IsSendMail == true)
{
// _context.Notifications.Add(new Notification
// {
// Body = req.Body,
// ReceiverUserId = req.ReceiverUserId,
// Type = "",
// Payload = "",
// CreatedUserId = UserId ?? "System Administrator",
// CreatedFullName = FullName ?? "",
// CreatedAt = DateTime.Now,
// LastUpdateFullName = FullName ?? "System Administrator",
// LastUpdateUserId = UserId ?? "",
// LastUpdatedAt = DateTime.Now,
// });
_emailSenderService.SendMail(Subject, Body, "kittapath@frappet.com");
}
await _dbContext.SaveChangesAsync();
}