Compare commits

..

No commits in common. "fe503a70dcba3991d31889353c5a6b18e92741fe" and "c7304dc80b6b3eef54791365a89d412aacb55d2f" have entirely different histories.

View File

@ -275,7 +275,7 @@ namespace MarcoBMS.Services.Controllers
if (recordAttendanceDot.MarkTime == null) return BadRequest(ApiResponse<object>.ErrorResponse("Invalid Mark Time", "Invalid Mark Time",400));
DateTime finalDateTime = GetDateFromTimeStamp(recordAttendanceDot.Date, recordAttendanceDot.MarkTime);
DateTime finalDateTime = GetDateFromTimeStamp(recordAttendanceDot, recordAttendanceDot.MarkTime);
if (recordAttendanceDot.Comment == null) return BadRequest(ApiResponse<object>.ErrorResponse("Invalid Comment", "Invalid Comment", 400));
if (attendance != null)
@ -298,8 +298,7 @@ namespace MarcoBMS.Services.Controllers
}
else if (recordAttendanceDot.Action == ATTENDANCE_MARK_TYPE.REQUEST_REGULARIZE)
{
DateTime date = attendance.AttendanceDate;
finalDateTime = GetDateFromTimeStamp(date.Date, recordAttendanceDot.MarkTime);
attendance.OutTime = finalDateTime;
attendance.Activity = ATTENDANCE_MARK_TYPE.REQUEST_REGULARIZE;
// do nothing
@ -400,9 +399,9 @@ namespace MarcoBMS.Services.Controllers
}
private static DateTime GetDateFromTimeStamp(DateTime date, string timeString)
private static DateTime GetDateFromTimeStamp(RecordAttendanceDot recordAttendanceDot, string timeString)
{
//DateTime date = recordAttendanceDot.Date;
DateTime date = recordAttendanceDot.Date;