| |

VerySource

 Forgot password?
 Register
Search
View: 716|Reply: 2

What can I do to check the update log at the front desk?

[Copy link]

3

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-9 20:00:01
| Show all posts |Read mode
I now want to give the system a function to view the update log. I want to know what user name a record is, when it was updated, what information was updated, etc. How to do it. I initially thought that several methods are not feasible.
1. Do it on the triger, but can't know what the user name is changed and what is updated?
2. Do it in the program, but how to determine whether the value has been updated. Anyway, the statement writes update, etc. If there are hundreds of fields, it is not necessary to judge hundreds of times, which is not feasible.
Is there a good way to ask everyone?
Reply

Use magic Report

0

Threads

41

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-1-22 09:45:01
| Show all posts
We put it in the database


/// add log into database
/// <seealso cref = "CDASystemLog.InsertSystemLog" />
/// </ summary>
/// <param name = "logType"> Log type </ param>
/// <param name = "logDescription"> Log description information </ param>
/// <remarks> Call the InsertSystemLog function in CDASystemLog to insert a system operation log into the database </ remarks>
protected void AddSystemLog (string logType, string logDescription)
{
if (CurrentUser! = null)
{
try
{
CDASystemLog dasl = new CDASystemLog ();
dasl.InsertSystemLog (Session.SessionID, CurrentUser.UserID, DateTime.Now, "Topis." + _ moduleID, logType,
logDescription, Request.UserHostAddress,
Request.Browser.Platform, Request.Browser.Type + "." + Request.Browser.MinorVersion,
Thread.CurrentThread.CurrentUICulture.Name);
}
catch
{

}
}
}
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-22 16:18:02
| Show all posts
In the program, as long as the three operations Insert, Update, Delete are recorded, even if there is no update, but the update action is done.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list