public static void Log(int publishmentSystemID, int nodeID, int contentID, EGovInteractLogType logType, string administratorName, int departmentId) { var logInfo = new GovInteractLogInfo(0, publishmentSystemID, nodeID, contentID, departmentId, administratorName, logType, PageUtils.GetIpAddress(), DateTime.Now, string.Empty); var departmentName = DepartmentManager.GetDepartmentName(departmentId); if (logType == EGovInteractLogType.Accept) { logInfo.Summary = $"{departmentName}({administratorName})受理办件"; } else if (logType == EGovInteractLogType.Deny) { logInfo.Summary = $"{departmentName}({administratorName})拒绝受理办件"; } else if (logType == EGovInteractLogType.Reply) { logInfo.Summary = $"{departmentName}({administratorName})回复办件"; } else if (logType == EGovInteractLogType.Comment) { logInfo.Summary = $"{departmentName}({administratorName})批示办件"; } else if (logType == EGovInteractLogType.Redo) { logInfo.Summary = $"{departmentName}({administratorName})要求返工"; } else if (logType == EGovInteractLogType.Check) { logInfo.Summary = $"{departmentName}({administratorName})审核通过"; } DataProvider.GovInteractLogDao.Insert(logInfo); }
public static void LogTranslate(int publishmentSystemID, int nodeID, int contentID, string nodeName, string administratorName, int departmentId) { var logInfo = new GovInteractLogInfo(0, publishmentSystemID, nodeID, contentID, departmentId, administratorName, EGovInteractLogType.Translate, PageUtils.GetIpAddress(), DateTime.Now, $"{DepartmentManager.GetDepartmentName(departmentId)}({administratorName})从分类“{nodeName}”转移办件至此 "); DataProvider.GovInteractLogDao.Insert(logInfo); }
public static void LogSwitchTo(int publishmentSystemID, int nodeID, int contentID, string switchToDepartmentName, string administratorName, int departmentId) { var logInfo = new GovInteractLogInfo(0, publishmentSystemID, nodeID, contentID, departmentId, administratorName, EGovInteractLogType.SwitchTo, PageUtils.GetIpAddress(), DateTime.Now, $"{DepartmentManager.GetDepartmentName(departmentId)}({administratorName})转办办件至{switchToDepartmentName} "); DataProvider.GovInteractLogDao.Insert(logInfo); }
public static void LogNew(int publishmentSystemID, int nodeID, int contentID, string realName, string toDepartmentName) { var logInfo = new GovInteractLogInfo(0, publishmentSystemID, nodeID, contentID, 0, string.Empty, EGovInteractLogType.New, PageUtils.GetIpAddress(), DateTime.Now, $"前台{realName}提交办件{toDepartmentName}"); DataProvider.GovInteractLogDao.Insert(logInfo); }
public ArrayList GetLogInfoArrayList(int publishmentSystemId, int contentId) { var arraylist = new ArrayList(); string sqlString = $"SELECT LogID, PublishmentSystemID, NodeID, ContentID, DepartmentID, UserName, LogType, IPAddress, AddDate, Summary FROM wcm_GovInteractLog WHERE PublishmentSystemID = {publishmentSystemId} AND ContentID = {contentId} ORDER BY LogID"; using (var rdr = ExecuteReader(sqlString)) { while (rdr.Read()) { var i = 0; var logInfo = new GovInteractLogInfo(GetInt(rdr, i++), GetInt(rdr, i++), GetInt(rdr, i++), GetInt(rdr, i++), GetInt(rdr, i++), GetString(rdr, i++), EGovInteractLogTypeUtils.GetEnumType(GetString(rdr, i++)), GetString(rdr, i++), GetDateTime(rdr, i++), GetString(rdr, i)); arraylist.Add(logInfo); } rdr.Close(); } return(arraylist); }
public void Insert(GovInteractLogInfo logInfo) { var sqlString = "INSERT INTO wcm_GovInteractLog(PublishmentSystemID, NodeID, ContentID, DepartmentID, UserName, LogType, IPAddress, AddDate, Summary) VALUES (@PublishmentSystemID, @NodeID, @ContentID, @DepartmentID, @UserName, @LogType, @IPAddress, @AddDate, @Summary)"; var parms = new IDataParameter[] { GetParameter(ParmPublishmentsystemid, EDataType.Integer, logInfo.PublishmentSystemID), GetParameter(ParmNodeId, EDataType.Integer, logInfo.NodeID), GetParameter(ParmContentId, EDataType.Integer, logInfo.ContentID), GetParameter(ParmDepartmentId, EDataType.Integer, logInfo.DepartmentID), GetParameter(ParmUserName, EDataType.VarChar, 50, logInfo.UserName), GetParameter(ParmLogType, EDataType.VarChar, 50, EGovInteractLogTypeUtils.GetValue(logInfo.LogType)), GetParameter(ParmIpAddress, EDataType.VarChar, 50, logInfo.IPAddress), GetParameter(ParmAddDate, EDataType.DateTime, logInfo.AddDate), GetParameter(ParmSummary, EDataType.NVarChar, 255, logInfo.Summary) }; ExecuteNonQuery(sqlString, parms); }