How to create a user access history for a Desktop app

0

I am creating a desktop application (Commercial System) using C #. I have a User registration table in which all the employees who will log in to the system will be registered. On the registration screen, I would like a HISTORY tab and list all accesses of that user for a period ... It would look similar to the image below:

To store the history, what would be the best way to do it:

1 - Create a table in the same Bank (eg UserUser) and save everything in it;

2 - Write a log file and read it;

3 - ... Or another way to do it.

I'm sorry if this is a silly question, but I worry a lot about doing it right and then having no problems and mostly losing performance.

Thank you:)

    
asked by anonymous 22.09.2017 / 02:05

1 answer

0

Create a system log table, not just the user, and store the events in it ... on some systems, I have a structure with the following data:

data do servidor,
data do computador,
ip do computador,
id do usuario,
nome do computador,
tabela (usuarios,notas_fiscais,caixa,clientes,etc),
evento (insercao, alteracao, delecao,select,login, etc),
descricao (ex: alterou o nome do cliente de A para B),
id relacionado (pk do registro que sofreu alteração / inserção),

Finally, you can store various information, in your case, applied to this structure, it would be enough to select user events with the login event for example.

works very well for me, I hope it helps.

    
22.09.2017 / 02:45