Exemple #1
0
        /// <summary>
        /// 医院专家查询(按拼音)
        /// </summary>
        /// <param name="pydm">医生名字拼音</param>
        /// <returns></returns>
        public XmlDocument Listdoctor(string pydm)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                ArrayList _list     = new ArrayList();
                string    error_msg = "";

                QueryDB pdb = new QueryDB();
                int     ret = pdb.DB_ListDoctor(pydm, out _list, out error_msg);

                if (ret == 0)
                {
                    XmlElement root = doc.CreateElement(AppUtils.Tag_REXML_Root);
                    doc.AppendChild(root);

                    XmlElement eleMsg = doc.CreateElement(AppUtils.Tag_REXML_Message);
                    root.AppendChild(eleMsg);

                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (DoctorInfo pdt in _list)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleMsg.AppendChild(eleValue);

                        XmlElement eleYsxm = doc.CreateElement(AppUtils.Tag_Payment_YSXM);
                        eleValue.AppendChild(eleYsxm);
                        eleYsxm.InnerText = pdt.xm;

                        XmlElement eleYsdm = doc.CreateElement(AppUtils.Tag_Payment_YSDM);
                        eleValue.AppendChild(eleYsdm);
                        eleYsdm.InnerText = pdt.dm;

                        XmlElement eleYsjb = doc.CreateElement(AppUtils.Tag_Payment_YSJB);
                        eleValue.AppendChild(eleYsjb);
                        eleYsjb.InnerText = pdt.jb;
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }