Exemple #1
0
        public static string GetOperationLog(OpentionLog opLog, string messageID)
        {
            XmlNode nodex = null;
            try
            {
                switch (lang)
                {
                    case AppLanguage.CN:
                        if (OpLogCN == null)
                        {
                            OpLogCN = new XmlDocument();
                            OpLogCN.Load(ApplicationConfiguration.AppRoot + @"\LanguageMessage\OpLog-CN.xml");
                        }
                        nodex = OpLogCN.SelectSingleNode("//root/" + opLog.ToString() + "/" + messageID);
                        break;
                    case AppLanguage.EN:
                        if (OpLogEN == null)
                        {
                            OpLogEN = new XmlDocument();
                            OpLogEN.Load(ApplicationConfiguration.AppRoot + @"\LanguageMessage\OpLog-EN.xml");
                        }
                        nodex = OpLogEN.SelectSingleNode("//root/" + opLog.ToString() + "/" + messageID);
                        break;
                }
            }
            catch (Exception)
            {

            }

            if (nodex != null)
                return nodex.InnerText;
            return "";
        }
Exemple #2
0
 public static string GetOperationLog(OpentionLog opLog, string messageID, string para1, string para2)
 {
     string result = GetOperationLog(opLog, messageID);
     result = System.Text.RegularExpressions.Regex.Replace(result, "%1", para1);
     result = System.Text.RegularExpressions.Regex.Replace(result, "%2", para2);
     return result;
 }