protected virtual int Log(int userId, string tableName, string transctionType, int logObjectId) { int result = 0; try { FreeTransactionLog log = new FreeTransactionLog(userId) { TableName = tableName, TransactionType = transctionType }; if (logObjectId > 0) { log.LogObject = logObjectId; } using (TransactionLogDL transDL = new TransactionLogDL()) { result = transDL.Insert(log); } } catch (Exception) { throw; } return(result); }
public int Insert() { int result = 0; try { using (TransactionLogDL transDL = new TransactionLogDL()) { result = transDL.Insert(this); } } catch (Exception) { throw; } return(result); }