/// <summary> /// 查询收费项目(按拼音) /// </summary> /// <param name="pydm">拼音代码</param> /// <returns></returns> public XmlDocument Querycharge(string pydm) { XmlDocument doc = new XmlDocument(); try { ArrayList _list = new ArrayList(); string error_msg = ""; QueryDB pdb = new QueryDB(); int ret = pdb.DB_QueryCharge(pydm, out _list, out error_msg); if (ret == 0) { doc = new XmlDocument(); XmlElement root = doc.CreateElement(AppUtils.Tag_REXML_Root); doc.AppendChild(root); XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result); eleResult.InnerText = AppUtils.Value_Return_Success; root.AppendChild(eleResult); XmlElement eleMsg = doc.CreateElement(AppUtils.Tag_REXML_Message); root.AppendChild(eleMsg); foreach (ChargeDetail pdt in _list) { XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value); eleMsg.AppendChild(eleValue); XmlElement eleFylx = doc.CreateElement(AppUtils.Tag_Payment_FYLX); eleValue.AppendChild(eleFylx); //以下实现数据操作逻辑 eleFylx.InnerText = pdt.lx; XmlElement eleFymc = doc.CreateElement(AppUtils.Tag_Payment_FYMC); eleValue.AppendChild(eleFymc); //以下实现数据操作逻辑 eleFymc.InnerText = pdt.mc; XmlElement eleFydw = doc.CreateElement(AppUtils.Tag_Payment_FYDW); eleValue.AppendChild(eleFydw); //以下实现数据操作逻辑 eleFydw.InnerText = pdt.dw; XmlElement eleFyjg = doc.CreateElement(AppUtils.Tag_Payment_FYJG); eleValue.AppendChild(eleFyjg); //以下实现数据操作逻辑 eleFyjg.InnerText = pdt.jg.ToString("0.0000"); } //eleResult.InnerText = "1"; } else { doc = ErrorReturnXml(ret, error_msg); } } catch (Exception ex) { doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex); } return(doc); }