public static string SaveUserLog(string strConnection, int actSerial, int sysUserId, LogActType actType, string funcId, object actIp, string userId) { SqlParameter[] param = { new SqlParameter("actSerial", SqlDbType.Int, 4, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, actSerial), new SqlParameter("sysUserId", SqlDbType.Char, 10, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, sysUserId), new SqlParameter("actType", SqlDbType.TinyInt, 1, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, actType), new SqlParameter("funcId", SqlDbType.Char, 8, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, (funcId == null || funcId.ToString().Trim() == "" ? "": (object)funcId)), new SqlParameter("actIp", SqlDbType.VarChar, 255, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, (actIp == null || actIp.ToString().Trim() == "" ? "": actIp)), new SqlParameter("userId", SqlDbType.VarChar, 50, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, userId), }; string strSql = "insert into S90_userLog (actSerial,sysUserId,actType,funcId,actIp,userId,actTime) values (@actSerial,@sysUserId,@actType,@funcId,@actIp,@userId,getdate())"; string errStr = SqlTool.ExecuteNonQuery(strConnection, strSql.ToString(), param); if (errStr != "") { return(errStr); } else { return(""); } }
public static string SaveUserLog(int actSerial, int sysUserId, LogActType actType, string funcId, object actIp, string userId) { return(SaveUserLog(ZhConfig.GlobalSystemVar.StrConnection1, actSerial, sysUserId, actType, funcId, actIp, userId)); }