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

This commit is contained in:
Suphonchai Phoonsawat 2023-08-18 14:23:11 +07:00
parent cc902536d6
commit bdc5549910
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 DbSet<T> _dbSet;
private readonly IHttpContextAccessor _httpContextAccessor; private readonly IHttpContextAccessor _httpContextAccessor;
#endregion #endregion
#region " Constructor and Destructor " #region " Constructor and Destructor "
@ -38,8 +37,6 @@ namespace BMA.EHR.Application.Repositories
protected bool? IsPlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1"); protected bool? IsPlacementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
#endregion #endregion
#region " Methods " #region " Methods "
@ -63,7 +60,6 @@ namespace BMA.EHR.Application.Repositories
(entity as EntityBase).CreatedAt = DateTime.Now; (entity as EntityBase).CreatedAt = DateTime.Now;
} }
await _dbSet.AddAsync(entity); await _dbSet.AddAsync(entity);
await _dbContext.SaveChangesAsync(); await _dbContext.SaveChangesAsync();

View file

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

View file

@ -4,9 +4,9 @@
{ {
public Guid orderTypeValue { get; set; } 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; } public int orderYear { get; set; }