コード例 #1
0
        public WorkTimeReturnDto CorrectWorkTime(int workTimeId, UpdateWorkTimeDto updatedWorkTime)
        {
            if (!_workTimeOperations.IsValidWorkTime(workTimeId))
            {
                return(null);
            }
            var workTimeRegistration = _workTimeOperations.GetWorkTimeById(workTimeId);

            return(Mapper.Map <WorkTimeReturnDto>(
                       _workTimeOperations.CorrectWorkTime(workTimeRegistration, updatedWorkTime.UpdatedWorkTime)));
        }
コード例 #2
0
 public IActionResult MakeWorkTimeCorrection(int workTimeId, [FromBody] UpdateWorkTimeDto workTimeUpdate)
 {
     return(OkOrBadRequest(_workTimeService.CorrectWorkTime(workTimeId, workTimeUpdate)));
 }