add GetUserState to decide whether the user is currently In or Out.
#47
This commit is contained in:
parent
07bcb40315
commit
e4f987cc0b
@ -82,6 +82,8 @@ namespace SQLiteRepository
|
||||
Id = card.Id
|
||||
});
|
||||
}
|
||||
userObj.State = GetUserState(GetLogDirection(user.Id));
|
||||
|
||||
ret.Users.Add(userObj);
|
||||
}
|
||||
if (pageNumber == -1 && pageSize == -1)
|
||||
@ -98,6 +100,17 @@ namespace SQLiteRepository
|
||||
return ret;
|
||||
}
|
||||
|
||||
private bool GetUserState(LogDirectionDb logDirection)
|
||||
{
|
||||
switch (logDirection)
|
||||
{
|
||||
case LogDirectionDb.OUT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public UserList Search(string searchParam)
|
||||
{
|
||||
_logger.Trace("Searching SQLite database for the term: {0}", searchParam);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user