fix defect

เพิ่ม api ตาม spec ใหม่
This commit is contained in:
Suphonchai Phoonsawat 2024-01-15 10:52:39 +07:00
parent 4f32e253fd
commit 82e6ce6d11
7 changed files with 166 additions and 18 deletions

View file

@ -1,4 +1,5 @@
using BMA.EHR.Application.Common.Interfaces;
using System.Drawing;
using BMA.EHR.Application.Common.Interfaces;
using BMA.EHR.Application.Messaging;
using BMA.EHR.Domain.Models.HR;
using BMA.EHR.Domain.Models.Leave.Commons;
@ -575,6 +576,18 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
return data.Count > 0;
}
public async Task DeleteLeaveDocumentAsync(Guid Id)
{
var doc = await _dbContext.Set<LeaveDocument>()
.Where(x => x.Id == Id)
.FirstOrDefaultAsync();
if (doc != null)
{
_dbContext.Set<LeaveDocument>().Remove(doc);
await _dbContext.SaveChangesAsync();
}
}
#endregion
}
}