parent
4c99dfba71
commit
1943895eec
@ -96,10 +96,12 @@ namespace Interfaces
|
||||
/// <see cref="Identifier"/> object with the Unique Id triggering the event
|
||||
/// </param>
|
||||
/// <param name="logId">The resultant Id of the inserted TimeLog</param>
|
||||
/// <param name="logTime">Optional - To set the log time of the swipe.
|
||||
/// <remarks>Particularly useful for buffering logs in nodes if they cannot contact server for whatever reason to minimise data loss</remarks></param>
|
||||
/// <returns>
|
||||
/// <see cref="OperationResponse"/> to indicate procedure status.
|
||||
/// </returns>
|
||||
LogEventResponse LogEventTime(Identifier identifier, out int logId);
|
||||
LogEventResponse LogEventTime(Identifier identifier, out int logId, DateTime logTime = default(DateTime));
|
||||
|
||||
OperationResponse CreateGroup(Group group, out int groupId);
|
||||
List<Group> GetGroups(int userId = -1);
|
||||
|
||||
@ -410,8 +410,20 @@ namespace SQLiteRepository
|
||||
return ret;
|
||||
}
|
||||
|
||||
public LogEventResponse LogEventTime(Identifier identifier, out int logId)
|
||||
public LogEventResponse LogEventTime(Identifier identifier, out int logId, DateTime logTime = default(DateTime))
|
||||
{
|
||||
#region Set the LogTime before we start querying anything.
|
||||
if (logTime == default(DateTime))
|
||||
{
|
||||
logTime = DateTime.UtcNow;
|
||||
_logger.Debug("Using own log time: {0}", logTime.ToString("o"));
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Debug("Using supplied log time: {0}", logTime.ToString("o"));
|
||||
}
|
||||
#endregion
|
||||
|
||||
var ret = new LogEventResponse();
|
||||
var cardIdQuery = _connection.Query<CardUniqueId>(
|
||||
SQLiteProcedures.GET_CARDS_BY_UNIQUE_ID,
|
||||
@ -465,7 +477,7 @@ namespace SQLiteRepository
|
||||
#endregion
|
||||
|
||||
#region Get the current time (for swiping). and calendar week/year to help recall the data.
|
||||
var logTime = DateTime.UtcNow;
|
||||
|
||||
var calendarWeek = GetIso8601CalendarWeek(logTime);
|
||||
var year = logTime.Year;
|
||||
#endregion
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
namespace WindowsDataCenter
|
||||
using System;
|
||||
|
||||
namespace WindowsDataCenter
|
||||
{
|
||||
public class CardData
|
||||
{
|
||||
public DateTime? UtcTimeStamp { get; set; }
|
||||
public string CardUId { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user