I have a system in which allows the user to apply for taking leaves. The system also credits leaves to each user's account, twice a year.
Now, the administrator has full authority over this whole system and, can cancel the and grant leaves.
To analyze whether a user has not exceeded all privileges extended to him, it is required that the admin should be shown a record of the credit and debit of leaves taking place in each user account, like a log.
Something like this:
Now, I have made a table as below, to house this data:
My query now is that how do i achieve this? I mean, what should be my sql query and how should i display it? Should I create a Sql Server Agent job and display the data in a gridview? If yes, then how should I specify the steps for that.
My database has an employee table which stores the updated balance for each type of leave for every user. And the leave table houses the details of the requests made by the users. Basically, it stores all the details filled out in the leave application form.
I am confused as to how do I fetch the operations and changes occurring on these tables, for that is what is required to be displayed to the admin.