Exemplo n.º 1
0
        private void EnsureCheckIn(AttendanceLog attendanceLog, string workerId)
        {
            attendanceLog.CheckIn();
            _db.AddAttendanceLog(attendanceLog);
            var ok = _web.CheckIn(attendanceLog.ProjectId, workerId, attendanceLog.LogDate,
                                  attendanceLog.DeviceName).GetAwaiter().GetResult();

            if (ok)
            {
                _db.UploadAttendanceLogSuccess(attendanceLog.Id);
            }
        }