Esempio n. 1
0
        public void GetAboutInfo(ArrayActionResult result)
        {
            List <string> myList = new List <string>();

            string[] arr = new string[] {};

            //using (StreamReader sr = new StreamReader(AppDomain.CurrentDomain.BaseDirectory + "about.txt",System.Text.Encoding.GetEncoding("gb2312")))
            //{
            //    string line;
            //    while ((line = sr.ReadLine()) != null)
            //    {
            //        line.Trim();
            //        if(line != string.Empty)myList.Add(line);
            //    }
            //}


            XmlDocument doc       = new XmlDocument();
            string      aboutPath = AppDomain.CurrentDomain.BaseDirectory + "about.xml";

            doc.Load(aboutPath);
            XmlNodeList nodeList = doc.SelectNodes("//hospital");

            foreach (XmlNode node in nodeList)
            {
                myList.Add(node.InnerText);
            }
            result.ArrData = myList.ToArray();
        }
Esempio n. 2
0
        public override BaseActionResult Execute(Context context)
        {
            BaseActionResult bar = new BaseActionResult();

            try
            {
                switch (context.MessageName)
                {
                case "About_VersionThanks":
                {
                    ArrayActionResult result = new ArrayActionResult();
                    bar = result as BaseActionResult;

                    AboutBusiness.GetAboutInfo(result);
                }
                break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                bar.ReturnMessage = ex.Message;
                bar.Result        = false;
                bar.recode        = -1;

                lm.Error((long)ModuleEnum.Framework_Client, ModuleInstanceName.Framework, 53, ex.Message, Application.StartupPath.ToString(), (new System.Diagnostics.StackFrame(true)).GetFileName(),
                         (new System.Diagnostics.StackFrame(true)).GetFileLineNumber());
            }
            return(bar);
        }