/// <summary> /// 查询账户余额 /// </summary> /// <param name="brid">病人ID</param> /// <param name="brlx">病人类型 1:门诊 2:住院</param> /// <returns></returns> public XmlDocument QueryBalance(string brid, string brlx) { XmlDocument doc = new XmlDocument(); try { string error_msg = ""; BalanceInfo info = new BalanceInfo(); PaymentDB pdb = new PaymentDB(); int ret = pdb.DB_QueryBalance(brid, brlx, out info, out error_msg); if (ret == 0) { 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); XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value); eleMsg.AppendChild(eleValue); XmlElement eleZhye = doc.CreateElement(AppUtils.Tag_Balance_Zhye); eleValue.AppendChild(eleZhye); eleZhye.InnerText = info.zhye.ToString(); } else { doc = ErrorReturnXml(ret, error_msg); } } catch (Exception ex) { doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex); } return(doc); }