fix defect การลบรอบการปฏิบัติงาน
สร้างเอกสารสำหรับ Dev
This commit is contained in:
parent
b8c5f88142
commit
e21d19ea23
318 changed files with 18071 additions and 12180 deletions
|
|
@ -278,11 +278,18 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
else
|
||||
{
|
||||
var inUseRound = _userDutyTimeRepository.GetFirstInUseRound(oldData.Id);
|
||||
if (inUseRound != null || oldData.IsActive || oldData.IsDefault)
|
||||
|
||||
//if (inUseRound != null || oldData.IsActive || oldData.IsDefault)
|
||||
if (inUseRound != null)
|
||||
{
|
||||
throw new Exception("ไม่สามารถลบรอบการปฏิบัติงานที่ยังใช้งานอยู่ได้");
|
||||
}
|
||||
|
||||
if (oldData.IsDefault)
|
||||
{
|
||||
throw new Exception("ไม่สามารถลบรอบการปฏิบัติงานที่ตั้งค่า Default ได้");
|
||||
}
|
||||
|
||||
await _dutyTimeRepository.DeleteAsync(oldData);
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue