/// <summary>
        /// 调用外观对象,并将请求结果以自定义的XML序列化方式打包;
        /// </summary>
        /// <param name="facade"></param>
        /// <param name="sql"></param>
        /// <returns></returns>
        public XmlDocument GetCurrency(string sql)
        {
            if (facade == null)
            {
                throw new ArgumentNullException("facade");
            }
            if (string.IsNullOrEmpty(sql))
            {
                throw new ArgumentNullException("sql");
            }
            DbDataReader reader = facade.ExecuteQuery(sql);

            if (!reader.HasRows)
            {
                return(null);
            }
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement("root");

            doc.AppendChild(root);
            while (reader.Read())
            {
                XmlElement element = doc.CreateElement("currency");
                element.SetAttribute("code", reader.GetString(0));  // currency code
                element.SetAttribute("name", reader.GetString(1));  // currency code
                root.AppendChild(element);
            }
            return(doc);
        }
        private void btnQuery_Click(object sender, EventArgs e)
        {
            DataSet result = remObj.ExecuteQuery(txtQuery.Text);

            if ((result == null) || (result.Tables[0].Rows.Count == 0))
            {
                return;
            }
            txtMessage.Text = "";
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < 10; i++)
            {
                sb.Append(Convert.ToString(result.Tables[0].Rows[i][1]) + Environment.NewLine);
            }
            txtMessage.Text = sb.ToString();
        }