Commit Graph

68 Commits

Author SHA1 Message Date
72e98bdd2e optimise code to reduce code complexity on UpdateUser method in particular.
code has been split into smaller methods, and queries on db have been optimised to make fewer, larger queries than lots of small queries. (using IN sql queries).
restructured UpdateUser to be more logical which has reduced some of the complexity of the method.
When deleting unassociated cards, the system will ensure all timelogs associated to those Ids are deleted also.
CreateGroup will now not allow duplicate groups, but will return the ID of the existing Group found in the DB.
pulled out GetUserCount method to simplify the GetUsers method.
removed empty quotes in favour of string.empty
#95
2018-06-06 10:50:06 +01:00
b329fd6e5a add method to use SQL In queries to retrieve lists.
add queries DELETE_TIMELOG_ENTRIES and GET_CARDS_BY_UNIQUE_ID_LIST that use the IN command.
this will delete all timelog entries where the ids exist in the list, or get cards in the db where the unique Id exists in the DB respectively.

GET_GROUP_BY_NAME is to be used for checking whether a group already exists on create and is designed to only return one record.
#95
2018-06-06 10:45:22 +01:00
f871c23631 add converters to help convert from/to data transfer objects.
removed conversion code from SQLiteRepository.cs in favour of new converters.
pulled out string queries from SQLiteRepository and moved to SQLiteProcedures.cs.
#95
2018-06-04 11:07:29 +01:00
492314a956 beginnings of refactor for repository project.
#95
2018-06-01 10:08:43 +01:00
cfec829d96 minor tidy up 2018-05-30 13:32:24 +01:00
11a212a635 remove commented out code
#89
2018-05-25 12:28:41 +01:00
17e80975d9 Add code to update the directions for logs on the days where you are creating or deleting an entry from.
The code will change in> out and vice versa when an entry is created or deleted from the UI.
Does not affect the automatic TimeLog system (swipe cards etc)
#89
2018-05-25 12:27:09 +01:00
b266fbf8e0 Remove 0.3 upgrade script.
Implement Clear Unassigned Card method to remove all cards/identifiers from the database not assigned to a user.
Add procedure to delete cards from the db.
#69
2018-03-07 09:01:02 +00:00
55955b0e1b added extra logging for upgrades #85 2018-03-07 08:01:52 +00:00
c56144d9b3 create db version object for table to hold our db version.
update assemblyinfo so that it uses static const properties.
Create 0.2 upgrade script.
Add code to repository class that will check version of the database currently being referenced. IT will then proceed to run upgrade scripts (in order) from the oldest to newest version on the database, before finally setting the db version number.

#85
2018-03-06 17:07:05 +00:00
a768be9e9c update GET_ALL_USERS and GET_ALL_USERS_PAGINATE to retrieve users not archived.
#67
2017-04-25 14:39:16 +01:00
c92ed064fc move private methods to end of class.
change LogEventTime implementation to return a LogEventResponse object.
#17
2017-04-16 19:40:33 +01:00
e7b7538986 Merge branch 'BundleInstaller' into Release0.2 2017-04-15 20:30:13 +01:00
Watts
640ef5f2bf added debug and release installers build configuration to projects/solution to enable building installers in a complete/single step, to save building them individually. 2017-04-15 20:21:09 +01:00
Watts
64018ef8db moved update group and update user details procedures to SQLiteProcedures 2017-04-13 20:58:52 +01:00
Watts
2342aef8f9 update TimeLogDb to use LogSourceDb
#29
2017-04-12 22:01:10 +01:00
Watts
101c19e4f4 Implement CreateLog, DeleteLog, UpdateLog methods from interface.
include LogSourceDb in project
#29
2017-04-12 22:00:40 +01:00
Watts
4f4d247dc6 Add Log Source Identification to determine if a log has been created/updated from the UI/Other Applications
#29
2017-04-12 22:00:08 +01:00
119c60a0be update all dll versions to 0.1.5.0 2017-03-19 07:57:35 +00:00
4e3319ef69 implement GetUsers with a groupId filter applied.
implement GetGroup by Id method.
#64
2017-03-17 23:53:47 +00:00
33f1769d66 implement sql to get the AssignedUserCounts from the db.
change UpdateGroup to convert Group object to GroupDb for database update.
#30
2017-03-16 23:05:52 +00:00
ae3ffdfc27 fix missing argument in procedure for getting user groups.
#59
2017-03-08 16:55:39 +00:00
b4eb179c8f implemented the CreateGroup, GetGroups, UpdateGroup, DeleteGroup methods.
updated GetUsers and GetUser to populate the User object with groups list.
modified UpdateUser to link the User to the Group items in the DB
#59
2017-03-08 16:27:31 +00:00
a23bec7a5d added files to proj
#59
2017-03-08 16:24:20 +00:00
4a9a526e36 Add Joining table object to link users to groups.
#59
2017-03-08 16:23:57 +00:00
d2ff905afd create GroupDb object to hold group information
#59
2017-03-08 16:23:14 +00:00
72799981b6 moved the string update sql statement to a constant with the other procedures in SQLiteProcedures
#56
2017-03-03 21:48:09 +00:00
d41b5c528c change SQLiteRepository to update last used property against the Identifiers in database (CardUniqueId table).
updated LogEventTime method to update the last used time in the db.
changed LogEventTime method to not store timelogs against unassigned cards.
updated GetUnassignedIdentifierList method to populate the Identifier LastUsed property.
#56
2017-03-03 21:39:31 +00:00
d55a1ed817 add LastUsed property
#56
2017-03-03 21:36:22 +00:00
b0b1fd4576 Refactor code to simplify methods. 2017-03-03 13:01:31 +00:00
69f3e502e0 Add LastEventDateTime property to User object
Add Code to populate the LastEventDateTime property in SQLiteRepository - getting the last TimeLogEvent datetime. will return min value if no logs available.
#53
2017-03-03 13:00:01 +00:00
bb1eeed231 reference ConfigurationHandler and update calls to get configurations.
removed ConfigMonitor.cs.
#54
2017-03-02 22:04:58 +00:00
f4e8f0a76f updated the AssemblyInfo properties to be the right version. 2017-02-27 16:47:51 +00:00
e4724f2d3e Merge branch 'DefaultUserSorting-#52' into Release0.1.4 2017-02-27 15:17:29 +00:00
63a96e77cf Merge branch 'HomePageIndicator-#47' into Release0.1.4 2017-02-27 15:17:11 +00:00
e41f15eec8 reformat/reorder SQLiteProcedures file. 2017-02-27 15:16:23 +00:00
66def93ff1 added the order by arguments for GET_ALL_USERS_PAGINATE and GET_ALL_USERS procedures.
this will now order the users by LastName, then FirstName in alphabetical order (startint with a).
#52
2017-02-27 15:15:54 +00:00
e4f987cc0b add GetUserState to decide whether the user is currently In or Out.
#47
2017-02-27 10:24:23 +00:00
49235288d7 add implementation of the UserInformation property to populate it with the deftails for the given User
#46
2017-02-24 22:17:33 +00:00
fa38512c9a change code to only check the time log gap if the card is associated to a user.
This will ensure that multiple new users swiping their cards will definitely be added to the system.
#41
2017-02-23 21:02:37 +00:00
9fa97e2fc9 added extra logging to trace blocked swipe data events.
#39
2017-02-23 16:56:10 +00:00
67eed43160 fix ticks property for SwipeTimeGap.
#36
2017-02-22 22:47:38 +01:00
f5513ce122 change all versions to 0.1.2.0 2017-02-22 22:31:31 +01:00
0e1e23a770 create GET_LOGS_IN_LAST_X_MINUTES procedure.
implement logs in last x minute check.
can be configured from app.config file using "SwipeTimeGap" configuration. defaults to 3 minutes if configuration is not there.
#36
2017-02-22 21:17:53 +00:00
ebfced87ee fix relative file paths (file not found errors).
added razor engine to WindowsDataCenter project.
fixed odd logCount errors in spa.js/index.html
2017-02-16 17:07:48 +00:00
59e27c2991 Flatten the TimeLogsList object.
put DayOfWeek and Day into the DailyLogs object to help flatten.
changed GetTimeLogList to return List<DailyLogs>.
#15
2017-02-15 16:51:19 +00:00
8756964f0b add get user contracted hours procedure to supply the TimeLogList object HoursPerWeekMinutes property.
started databinding the timelogs page.

#15
2017-02-14 22:50:47 +00:00
69aaf53bb4 Added method to calculate the daily logs.
extended TimeLogList object:
 > to group logs into days with the "DailyLogs" object
 > to calculate the WeeklyTotal hours automatically based on the TimeLogs.DailyLogs object for each day.

Created DailyLogs object:
 > holds the number of entries for a day.
 > holds the time "in"/"at work" for that day (dailytotal).

#15
2017-02-14 17:06:16 +00:00
eb1ba4157a fixed log formatting.
#9
2017-02-14 16:31:44 +00:00
a2cb93bf83 fixup! add foreach to group logs by the day of the week in which they are entered. #15 2017-02-14 14:04:03 +00:00