public IHttpActionResult GetDDLs([FromUri] int personnelId, [FromUri] int replacedPersonnelId) { var shifts = _personnelShiftService.GetReplacedPersonnelShifts(personnelId); var replacedShifts = _personnelShiftService.GetReplacedPersonnelShifts(replacedPersonnelId); var workingHours = new List <WorkingHourDDLDto>(); foreach (var shift in shifts) { workingHours.AddRange(_workingHourService.GetForDDL(shift.Id)); } var replacedWorkingHours = new List <WorkingHourDDLDto>(); foreach (var shift in replacedShifts) { replacedWorkingHours.AddRange(_workingHourService.GetForDDL(shift.Id)); } return(Ok(new { shifts, replacedShifts, workingHours, replacedWorkingHours })); }
public IHttpActionResult GetForDDL(int shiftId) { var workingHours = _workingHourService.GetForDDL(shiftId); return(Ok(workingHours)); }