public void AddLog(string PropertyName, string PropertyValue, PortalSettings _PortalSettings, int UserID, string LogType)
        {
            LogProperties objProperties    = new LogProperties();
            LogDetailInfo objLogDetailInfo = new LogDetailInfo();

            objLogDetailInfo.PropertyName  = PropertyName;
            objLogDetailInfo.PropertyValue = PropertyValue;
            objProperties.Add(objLogDetailInfo);
            AddLog(objProperties, _PortalSettings, UserID, LogType, false);
        }
Exemplo n.º 2
0
 public LogInfo()
 {
     _LogGUID         = Guid.NewGuid().ToString();
     _BypassBuffering = false;
     _LogProperties   = new LogProperties();
     _LogPortalID     = -1;
     _LogPortalName   = "";
     _LogUserID       = -1;
     _LogUserName     = "";
 }
        public void AddLog(string PropertyName, string PropertyValue, PortalSettings _PortalSettings, int UserID, Services.Log.EventLog.EventLogController.EventLogType objLogType)
        {
            LogProperties objProperties    = new LogProperties();
            LogDetailInfo objLogDetailInfo = new LogDetailInfo();

            objLogDetailInfo.PropertyName  = PropertyName;
            objLogDetailInfo.PropertyValue = PropertyValue;
            objProperties.Add(objLogDetailInfo);
            AddLog(objProperties, _PortalSettings, UserID, objLogType.ToString(), false);
        }
Exemplo n.º 4
0
 public LogInfo()
 {
     _LogGUID = Guid.NewGuid().ToString();
     _BypassBuffering = false;
     _LogProperties = new LogProperties();
     _LogPortalID = -1;
     _LogPortalName = "";
     _LogUserID = -1;
     _LogUserName = "";
 }
Exemplo n.º 5
0
 public override string ToString()
 {
     System.Text.StringBuilder str = new System.Text.StringBuilder();
     str.Append("<b>LogGUID:</b> " + LogGUID + "<br>");
     str.Append("<b>LogType:</b> " + LogTypeKey + "<br>");
     str.Append("<b>UserID:</b> " + LogUserID.ToString() + "<br>");
     str.Append("<b>Username:</b> " + LogUserName + "<br>");
     str.Append("<b>PortalID:</b> " + LogPortalID.ToString() + "<br>");
     str.Append("<b>PortalName:</b> " + LogPortalName + "<br>");
     str.Append("<b>CreateDate:</b> " + LogCreateDate.ToString() + "<br>");
     str.Append("<b>ServerName:</b> " + LogServerName + "<br>");
     str.Append(LogProperties.ToString());
     return(str.ToString());
 }
        public void AddLog(LogProperties objProperties, PortalSettings _PortalSettings, int UserID, string LogTypeKey, bool BypassBuffering)
        {
            LogController objLogController = new LogController();
            LogInfo       objLogInfo       = new LogInfo();

            objLogInfo.LogUserID       = UserID;
            objLogInfo.LogTypeKey      = LogTypeKey;
            objLogInfo.LogProperties   = objProperties;
            objLogInfo.BypassBuffering = BypassBuffering;
            if (_PortalSettings != null)
            {
                objLogInfo.LogPortalID   = _PortalSettings.PortalId;
                objLogInfo.LogPortalName = _PortalSettings.PortalName;
            }
            objLogController.AddLog(objLogInfo);
        }
Exemplo n.º 7
0
 public void WriteXml(XmlWriter writer)
 {
     writer.WriteStartElement("log");
     writer.WriteAttributeString("LogGUID", LogGUID);
     writer.WriteAttributeString("LogFileID", LogFileID);
     writer.WriteAttributeString("LogTypeKey", LogTypeKey);
     writer.WriteAttributeString("LogUserID", LogUserID.ToString());
     writer.WriteAttributeString("LogUserName", LogUserName);
     writer.WriteAttributeString("LogPortalID", LogPortalID.ToString());
     writer.WriteAttributeString("LogPortalName", LogPortalName);
     writer.WriteAttributeString("LogCreateDate", LogCreateDate.ToString());
     writer.WriteAttributeString("LogCreateDateNum", LogCreateDateNum.ToString());
     writer.WriteAttributeString("BypassBuffering", BypassBuffering.ToString());
     writer.WriteAttributeString("LogServerName", LogServerName);
     writer.WriteAttributeString("LogConfigID", LogConfigID);
     LogProperties.WriteXml(writer);
     writer.WriteEndElement();
 }
        public void AddLog(PortalSettings _PortalSettings, int UserID, Services.Log.EventLog.EventLogController.EventLogType objLogType)
        {
            LogProperties objProperties = new LogProperties();

            AddLog(objProperties, _PortalSettings, UserID, objLogType.ToString(), false);
        }
Exemplo n.º 9
0
        public void ReadXml(XmlReader reader)
        {
            if (reader.HasAttributes)
            {
                while (reader.MoveToNextAttribute())
                {
                    switch (reader.Name)
                    {
                    case "LogGUID":
                        LogGUID = reader.ReadContentAsString();
                        break;

                    case "LogFileID":
                        LogFileID = reader.ReadContentAsString();
                        break;

                    case "LogTypeKey":
                        LogTypeKey = reader.ReadContentAsString();
                        break;

                    case "LogUserID":
                        LogUserID = reader.ReadContentAsInt();
                        break;

                    case "LogUserName":
                        LogUserName = reader.ReadContentAsString();
                        break;

                    case "LogPortalID":
                        LogPortalID = reader.ReadContentAsInt();
                        break;

                    case "LogPortalName":
                        LogPortalName = reader.ReadContentAsString();
                        break;

                    case "LogCreateDate":
                        LogCreateDate = System.DateTime.Parse(reader.ReadContentAsString());
                        break;

                    case "LogCreateDateNum":
                        LogCreateDateNum = reader.ReadContentAsLong();
                        break;

                    case "BypassBuffering":
                        BypassBuffering = bool.Parse(reader.ReadContentAsString());
                        break;

                    case "LogServerName":
                        LogServerName = reader.ReadContentAsString();
                        break;

                    case "LogConfigID":
                        LogConfigID = reader.ReadContentAsString();
                        break;
                    }
                }
            }
            reader.Read();
            if (reader.NodeType == XmlNodeType.Element && reader.LocalName == "LogProperties")
            {
                reader.ReadStartElement("LogProperties");
                if (reader.ReadState != ReadState.EndOfFile && reader.NodeType != XmlNodeType.None && !String.IsNullOrEmpty(reader.LocalName))
                {
                    LogProperties.ReadXml(reader);
                }
            }
        }
 public void AddLog(PortalSettings _PortalSettings, int UserID, Services.Log.EventLog.EventLogController.EventLogType objLogType)
 {
     LogProperties objProperties = new LogProperties();
     AddLog(objProperties, _PortalSettings, UserID, objLogType.ToString(), false);
 }
 public void AddLog(LogProperties objProperties, PortalSettings _PortalSettings, int UserID, string LogTypeKey, bool BypassBuffering)
 {
     LogController objLogController = new LogController();
     LogInfo objLogInfo = new LogInfo();
     objLogInfo.LogUserID = UserID;
     objLogInfo.LogTypeKey = LogTypeKey;
     objLogInfo.LogProperties = objProperties;
     objLogInfo.BypassBuffering = BypassBuffering;
     if (_PortalSettings != null)
     {
         objLogInfo.LogPortalID = _PortalSettings.PortalId;
         objLogInfo.LogPortalName = _PortalSettings.PortalName;
     }
     objLogController.AddLog(objLogInfo);
 }
 public void AddLog(string PropertyName, string PropertyValue, PortalSettings _PortalSettings, int UserID, string LogType)
 {
     LogProperties objProperties = new LogProperties();
     LogDetailInfo objLogDetailInfo = new LogDetailInfo();
     objLogDetailInfo.PropertyName = PropertyName;
     objLogDetailInfo.PropertyValue = PropertyValue;
     objProperties.Add(objLogDetailInfo);
     AddLog(objProperties, _PortalSettings, UserID, LogType, false);
 }
 public void AddLog(string PropertyName, string PropertyValue, PortalSettings _PortalSettings, int UserID, Services.Log.EventLog.EventLogController.EventLogType objLogType)
 {
     LogProperties objProperties = new LogProperties();
     LogDetailInfo objLogDetailInfo = new LogDetailInfo();
     objLogDetailInfo.PropertyName = PropertyName;
     objLogDetailInfo.PropertyValue = PropertyValue;
     objProperties.Add(objLogDetailInfo);
     AddLog(objProperties, _PortalSettings, UserID, objLogType.ToString(), false);
 }