public int AddMessage(string Message, Enums.enMsgType MessageType, System.DateTime MessageDate, String MessageSource, String MessageMethod, String StackTrace, String LinkedControlName, Type LinkedControlType) { RTNMessage MSG = new RTNMessage(Message, MessageType, MessageDate, MessageSource, MessageMethod, StackTrace); MsgArray.Add(MSG); return(MsgArray.Count); }
public int AddMessage(String Message, Enums.enMsgType MessageType, System.DateTime MessageDate, String MessageSource, String MessageMethod) { RTNMessage MSG = new RTNMessage(Message, MessageType, MessageDate, MessageSource, MessageMethod); MsgArray.Add(MSG); return(MsgArray.Count); }
public bool ReadXML(string XML) { try { XML = System.Web.HttpUtility.HtmlDecode(XML); StringReader SR = new StringReader(XML); XmlDocument XD = new XmlDocument(); XD.Load(SR); SR.Close(); SR = null; if (XD.GetElementsByTagName("Messages") == null) { return(false); } XmlNode XN = XD.GetElementsByTagName("Messages").Item(0); foreach (XmlNode N in XN.ChildNodes) { RTNMessage M = new RTNMessage(); if ((N.Attributes["Message"] != null)) { M.Message = HttpUtility.HtmlDecode(N.Attributes["Message"].Value); } if ((N.Attributes["MessageType"] != null)) { M.MessageType = (Enums.enMsgType)Enum.Parse(typeof(Enums.enMsgType), N.Attributes["MessageType"].Value); } if ((N.Attributes["MessageDate"] != null)) { M.MessageDate = System.DateTime.Parse(N.Attributes["MessageDate"].Value); } if ((N.Attributes["MessageSource"] != null)) { M.MessageSource = HttpUtility.HtmlDecode(N.Attributes["MessageSource"].Value); } if ((N.Attributes["MessageSourceMethod"] != null)) { M.MessageSourceMethod = HttpUtility.HtmlDecode(N.Attributes["MessageSourceMethod"].Value); } if ((N.Attributes["StackTrace"] != null)) { M.StackTrace = HttpUtility.HtmlDecode(N.Attributes["StackTrace"].Value); } this.Add(M); } return(true); } catch { return(false); } }
public int Add(RTNMessage Message) { MsgArray.Add(Message); return(MsgArray.Count); }