
Untitled
By: a guest on
May 4th, 2012 | syntax:
None | size: 0.64 KB | hits: 9 | expires: Never
c# - What's the best way to keep log for events of windows form application?
private AddUser(User id)
{
if(id != null)
{
MessageBox.Show("Item Updated");
string sqlAddUser = "INSERT INTO 'DATABASE.USER' VALUES (Item.ID, Item.Name, Item.Address)";
if(db.SqlNonQuery(sqlAddUser) //If successful
{
///To DO : Add system log into database
///Ex. string sqlLog = DateTime.Now + User.ID + " added Item ID " + item.ID;
}
else
{
MessageBox.Show("Error");
}
}
}