fix bug แก้ไขใบลา
This commit is contained in:
parent
c01ed73e7e
commit
7cae86e577
1 changed files with 5 additions and 4 deletions
|
|
@ -69,6 +69,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
{
|
||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.Include(x => x.LeaveDocument)
|
||||
.ThenInclude(x => x.Document)
|
||||
.Include(x => x.LeaveDraftDocument)
|
||||
.Include(x => x.LeaveCancelDocument)
|
||||
.Include(x => x.Type)
|
||||
|
|
@ -85,8 +86,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
if (entity.LeaveDraftDocument != null)
|
||||
_dbContext.Attatch(entity.LeaveDraftDocument);
|
||||
|
||||
if (entity.LeaveDocument != null)
|
||||
_dbContext.Attatch(entity.LeaveDocument);
|
||||
// if (entity.LeaveDocument != null)
|
||||
// _dbContext.Attatch(entity.LeaveDocument);
|
||||
|
||||
if (entity.Type != null)
|
||||
_dbContext.Attatch(entity.Type);
|
||||
|
|
@ -102,8 +103,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
if (entity.LeaveDraftDocument != null)
|
||||
_dbContext.Attatch(entity.LeaveDraftDocument);
|
||||
|
||||
if (entity.LeaveDocument != null)
|
||||
_dbContext.Attatch(entity.LeaveDocument);
|
||||
// if (entity.LeaveDocument != null)
|
||||
// _dbContext.Attatch(entity.LeaveDocument);
|
||||
|
||||
if (entity.Type != null)
|
||||
_dbContext.Attatch(entity.Type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue