แก้บันทึกและแก้ไขเลขที่คำสั่ง จาก int to str

This commit is contained in:
Suphonchai Phoonsawat 2023-08-18 14:23:11 +07:00
parent cc902536d6
commit 8ee7dc94a2
3 changed files with 5 additions and 9 deletions

View file

@ -14,7 +14,6 @@ namespace BMA.EHR.Application.Repositories
private readonly DbSet<T> _dbSet;
private readonly IHttpContextAccessor _httpContextAccessor;
#endregion
#region " Constructor and Destructor "
@ -36,9 +35,7 @@ namespace BMA.EHR.Application.Repositories
protected string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
protected bool? IsPlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
protected bool? IsPlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
#endregion
@ -63,7 +60,6 @@ namespace BMA.EHR.Application.Repositories
(entity as EntityBase).CreatedAt = DateTime.Now;
}
await _dbSet.AddAsync(entity);
await _dbContext.SaveChangesAsync();

View file

@ -381,7 +381,7 @@ namespace BMA.EHR.Command.Service.Controllers
{
var inserted = new Domain.Models.Commands.Core.Command
{
CommandNo = req.orderNo.ToString(),
CommandNo = req.orderNo,
CommandYear = req.orderYear.ToString(),
CommandSubject = req.orderTitle,
PositionName = req.registerPosition,
@ -433,7 +433,7 @@ namespace BMA.EHR.Command.Service.Controllers
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
order.CommandNo = req.orderNo.ToString();
order.CommandNo = req.orderNo;
order.CommandYear = req.orderYear.ToString();
order.CommandSubject = req.orderTitle;
order.PositionName = req.registerPosition;

View file

@ -4,9 +4,9 @@
{
public Guid orderTypeValue { get; set; }
public string orderTitle { get; set; }
public string orderTitle { get; set; } = string.Empty;
public int orderNo { get; set; }
public string orderNo { get; set; } = string.Empty;
public int orderYear { get; set; }