示例#1
0
        /// <summary>
        /// 用户注册_带绑卡
        /// </summary>
        /// <param name="info">用户信息</param>
        /// <returns></returns>
        public XmlDocument UserRegisterBindCard(UserInfo info)
        {
            XmlDocument doc;

            try
            {
                //以下实现数据操作逻辑
                UserRegisterDB pdb = new UserRegisterDB();
                string         msg;
                int            ret = pdb.DB_UserRegisterBindCard(info, out msg);
                if (ret == 0)
                {
                    msg = "注册成功!";
                    doc = ReplyXmlDoc.GetSuccessXML(ret, msg);
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#2
0
        public string accountService(string optype, string paramxml)
        {
            XmlDocument      rtdoc   = null;
            ParameterHandler handler = null;

            log4net.Config.XmlConfigurator.Configure();//系统日志配置
            ILog logger = LogManager.GetLogger("log");

            try
            {
                logger.Info(optype + ":" + paramxml.Replace("<![CDATA[", "").Replace("]]>", ""));
                handler = parameterHanding(paramxml);

                if (m_processors.ContainsKey(optype))
                {
                    OperatorHandleProcessor processor = m_processors[optype];
                    rtdoc = processor(handler);
                }
                else
                {
                    rtdoc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, "未知的操作请求,请确认后重新发送");
                }
            }
            catch (Exception ex)
            {
                rtdoc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, AppUtils.Content_Payment_Excp + "[" + ex.StackTrace + "]");
                logger.Error(rtdoc.OuterXml);
            }

            if (optype == "FY030315")
            {
                return("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?><root><result>success</result><message>FY030315接口被调用</message></root>");
            }

            //if (optype == "FY030306")
            //{
            //    logger.Debug(ReplyXmlDoc.GetWaitXml("程序未响应,请等待...").OuterXml);
            //    return "<?xml version=\"1.0\" encoding=\"utf-8\"?><root><message><value><msg>fail</msg><msg2>100抱歉,候诊时间已过!2017-5-4 16:35:00</msg2></value></message><result>success</result></root>";
            //}

            if (optype == "FY030303" || optype == "FY030305" || optype == "FY030306" || optype == "OR030204" || optype == "OR030205" || optype == "OR030206")
            {
                logger.Debug(rtdoc.OuterXml);

                //XmlDocument xdoc = new XmlDocument();
                //xdoc.LoadXml(rtdoc.OuterXml);
                //XmlNode root = xdoc.SelectSingleNode("//result");//当节点Workflow带有属性是,使用SelectSingleNode无法读取
                //string result = root.InnerText;
                //if (result == "fail")
                //{
                //    return "<?xml version=\"1.0\" encoding=\"utf-8\"?><root><result>fail</result><message><status>-1</status><remark>操作失败</remark></message></root>";
                //}
                return(rtdoc.OuterXml.Replace("<result>fail</result>", "<result>success</result>"));
            }
            XmlDeclaration delar = rtdoc.CreateXmlDeclaration("1.0", "utf-8", "no");
            XmlElement     droot = rtdoc.DocumentElement;

            rtdoc.InsertBefore(delar, droot);
            return(rtdoc.OuterXml);
        }
示例#3
0
        public string accountService(string optype, string paramxml)
        {
            XmlDocument      rtdoc   = null;
            ParameterHandler handler = null;

            try {
                handler = parameterHanding(paramxml);

                if (m_processors.ContainsKey(optype))
                {
                    OperatorHandleProcessor processor = m_processors [optype];
                    rtdoc = processor(handler);
                }
                else
                {
                    rtdoc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, "未知的操作请求,请确认后重新发送");
                }
            } catch (Exception ex) {
                rtdoc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, AppUtils.Content_Payment_Excp + "[" + ex.StackTrace + "]");
            }

            XmlDeclaration delar = rtdoc.CreateXmlDeclaration("1.0", "utf-8", "no");
            XmlElement     droot = rtdoc.DocumentElement;

            rtdoc.InsertBefore(delar, droot);
            return(rtdoc.OuterXml);
        }
示例#4
0
        /// <summary>
        /// 取消订单
        /// </summary>
        /// <param name="yylsh">医院流水号</param>
        /// <returns></returns>
        public XmlDocument CancelOrder(long yylsh)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                string msg = "";

                PaymentDB pdb = new PaymentDB();
                int       ret = pdb.DB_CancelOrder(yylsh, out msg);

                if (ret == 0)
                {
                    doc = ReplyXmlDoc.GetSuccessXML(ret, msg);
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }

            return(doc);
        }
示例#5
0
        /// <summary>
        /// 确认订单
        /// </summary>
        /// <param name="yylsh">银行流水号</param>
        /// <param name="yydm">银行代码</param>
        /// <param name="yhmc">银行名称</param>
        /// <param name="yhlsh">医院流水号</param>
        /// <param name="czje">充值金额</param>
        /// <param name="tkje">退款给金额</param>
        /// <param name="czsj">操作时间</param>
        /// <param name="zzlx">充值类型 01-银联充值</param>
        /// <returns></returns>
        public XmlDocument FinishOrder(long yylsh, string yhlsh, string sjczzt, DateTime czsj,
                                       string payType)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                string msg = "";

                PaymentDB pdb = new PaymentDB();
                int       ret = pdb.DB_FinishOrder(yylsh, yhlsh, sjczzt, czsj, payType, out msg);

                if (ret == 0)
                {
                    doc = ReplyXmlDoc.GetSuccessXML(ret, msg);
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#6
0
        /// <summary>
        /// 插入银联记录
        /// </summary>
        /// <param name="info">银联信息</param>
        /// <returns></returns>
        public XmlDocument InsertCcb(YLReplyInfo info)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                string msg = "";

                PaymentDB pdb = new PaymentDB();
                int       ret = pdb.DB_InsertCcb(info, out msg);

                if (ret == 0)
                {
                    doc = ReplyXmlDoc.GetSuccessXML(ret, msg);
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }

            return(doc);
        }
示例#7
0
        /// <summary>
        /// 订单状态查询
        /// </summary>
        /// <param name="yylsh">医院流水号</param>
        /// <returns></returns>
        public XmlDocument StatusOrder(long yylsh)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                XmlElement root = doc.CreateElement(AppUtils.Tag_REXML_Root);
                doc.AppendChild(root);
                string msg   = "";
                string _ztmc = "";
                long   _ddzt = 0;
                double _czje = 0;

                PaymentDB pdb   = new PaymentDB();
                int       dbout = pdb.DB_StatusOrder(yylsh, out _ddzt, out _ztmc, out _czje, out msg);

                if (dbout == 0)
                {
                    doc = ReplyXmlDoc.GetExceptionXML(dbout, msg);
                }
                else
                {
                    doc = ErrorReturnXml(dbout, msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#8
0
        /// <summary>
        /// 卡是否有效
        /// </summary>
        /// <param name="brid">病人ID</param>
        /// <param name="bkhm">卡号</param>
        /// <param name="brlx">病人类型 1-门诊  2-住院</param>
        /// <returns></returns>
        public XmlDocument VaildCard(string brid, string bkhm, string brlx)
        {
            XmlDocument doc;

            try
            {
                //以下实现数据操作逻辑
                BindCardDB pdb = new BindCardDB();
                string     error_msg;
                int        ret = pdb.DB_ValidCard(brid, bkhm, brlx, out error_msg);
                if (ret == 0)
                {
                    doc = ReplyXmlDoc.GetSuccessXML(ret, error_msg);
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#9
0
        public XmlDocument QueryReportListFromWebservice(string brxm, string lxdh)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                ArrayList values    = new ArrayList();
                string    error_msg = "";
                string    endTime   = DateTime.Now.AddDays(1).ToString(AppUtils.DateTime_FormatNO_YearMonthDay);
                string    startTime = DateTime.Now.AddDays(-60).ToString(AppUtils.DateTime_FormatNO_YearMonthDay);
                //DateTime endTime = DateTime.Now;
                //DateTime startTime = DateTime.Now.AddDays(-60);

                ReportInfoHandleForWZSZYY pdb = new ReportInfoHandleForWZSZYY();
                int ret = pdb.ReportInfoList(brxm, lxdh, startTime, endTime, out values, 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);

                    foreach (ReportInfo ri in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);

                        string[] tags = { AppUtils.Tag_Payment_BGDH, AppUtils.Tag_Payment_SJMD, AppUtils.Tag_Payment_CJSJ, AppUtils.Tag_Payment_SJR,
                                          AppUtils.Tag_Payment_JYSJ, AppUtils.Tag_Payment_JYR,  AppUtils.Tag_Payment_SHR,  AppUtils.Tag_Payment_JZCH,
                                          AppUtils.Tag_Payment_ZDJG, AppUtils.Tag_Payment_BBMC, AppUtils.Tag_Payment_MZBZ, AppUtils.Tag_Payment_DYJB,
                                          AppUtils.Tag_Payment_BZ,   AppUtils.Tag_Payment_HZHB, AppUtils.Tag_Query_SBM,    AppUtils.Tag_Query_JGMC };

                        foreach (string tag in tags)
                        {
                            string     value  = ri.getValue(tag);
                            XmlElement eleTag = doc.CreateElement(tag);
                            eleTag.InnerText = (null != value) ? value : "";
                            eleValue.AppendChild(eleTag);
                        }
                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }

            return(doc);
        }
示例#10
0
        /// <summary>
        /// 交易明细
        /// </summary>
        /// <param name="brid">病人ID</param>
        /// <param name="brlx">病人类型 1:门诊  2:住院</param>
        /// <returns></returns>
        public XmlDocument QueryDetail(string brid, string brlx)
        {
            XmlDocument doc = new XmlDocument();

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

                PaymentDB pdb   = new PaymentDB();
                int       rtint = pdb.DB_QueryDetail(brid, brlx, out _list, out error_msg);

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

                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = Convert.ToString(rtint);
                    root.AppendChild(eleResult);

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

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

                        XmlElement eleOpdate = doc.CreateElement(AppUtils.Tag_Payment_OPDATE);
                        eleValue.AppendChild(eleOpdate);
                        //以下实现数据操作逻辑
                        eleOpdate.InnerText = pdt.rq.ToString("yyyy-MM-dd");

                        XmlElement eleJe = doc.CreateElement(AppUtils.Tag_Payment_CZJE);
                        eleValue.AppendChild(eleJe);
                        //以下实现数据操作逻辑
                        eleJe.InnerText = pdt.je.ToString("0.00");

                        XmlElement eleItem = doc.CreateElement(AppUtils.Tag_REXML_ITEM);
                        eleValue.AppendChild(eleItem);
                        //以下实现数据操作逻辑
                        eleItem.InnerText = pdt.item;
                    }
                    //eleResult.InnerText = "1";
                }
                else
                {
                    doc = ErrorReturnXml(rtint, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }

            return(doc);
        }
示例#11
0
        /// <summary>
        /// 取药查询
        /// </summary>
        /// <param name="brxm">病人</param>
        /// <param name="lxdh">联系电话</param>
        /// <returns></returns>
        public XmlDocument QueryPatientDrugInfo(string brxm, string lxdh)
        {
            XmlDocument doc = new XmlDocument();

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

                QueryDB pdb = new QueryDB();
                int     ret = pdb.DB_QueryPatientDrugInfo(brxm, lxdh, 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 (PatientDrugInfo pdi in _list)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleMsg.AppendChild(eleValue);

                        XmlElement eleKfrq = doc.CreateElement(AppUtils.Tag_Payment_KFRQ);
                        eleValue.AppendChild(eleKfrq);
                        //以下实现数据操作逻辑
                        eleKfrq.InnerText = pdi.rq;

                        XmlElement eleQyxh = doc.CreateElement(AppUtils.Tag_Payment_QYXH);
                        eleValue.AppendChild(eleQyxh);
                        //以下实现数据操作逻辑
                        eleQyxh.InnerText = pdi.xh;

                        XmlElement eleCfzt = doc.CreateElement(AppUtils.Tag_Payment_CFZT);
                        eleValue.AppendChild(eleCfzt);
                        //以下实现数据操作逻辑
                        eleCfzt.InnerText = pdi.zt;
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#12
0
        /// <summary>
        /// 科室排班信息
        /// </summary>
        /// <param name="departcode">二级科室代码</param>
        /// <returns></returns>
        public XmlDocument DepartmentSchedul(string departcode)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

            doc.AppendChild(root);

            QueryOrderDB pdb = new QueryOrderDB();
            string       msg;
            ArrayList    values;
            int          ret = pdb.DB_DepartmentSchedul(departcode, out values, out msg);

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

                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (AlipayDepartmentSchedul ri in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);

                        //XmlElement elescheduledate = doc.CreateElement(AppUtils.Tag_User_ScheduleDate);
                        //eleValue.AppendChild(elescheduledate);
                        //elescheduledate.InnerText = ri.scheduledate;

                        //XmlElement eleremain = doc.CreateElement(AppUtils.Tag_User_Remain);
                        //eleValue.AppendChild(eleremain);
                        //eleremain.InnerText = ri.remain;

                        //XmlElement eletotal = doc.CreateElement(AppUtils.Tag_User_Total);
                        //eleValue.AppendChild(eletotal);
                        //eletotal.InnerText = ri.total;

                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(ri.GetType(), ri);

                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }

                return(doc);
            }
            catch (Exception ex)
            {
                return(ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex));
            }
        }
示例#13
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);
        }
示例#14
0
        /// <summary>
        /// 生成订单
        /// </summary>
        /// <param name="bkhm">卡号</param>
        /// <param name="brid">病人ID</param>
        /// <param name="czje">充值金额</param>
        /// <param name="tkje">退款金额</param>
        /// <param name="brlx">病人类型 1-门诊  2-住院</param>
        /// <param name="payType">支付类型 alipay-支付宝 unionpay-银联</param>
        /// <returns></returns>
        public XmlDocument CreateOrder(string brid, string bkhm, double czje, double tkje, string brlx,
                                       string payType)
        {
            XmlDocument doc = new XmlDocument();

            if (WebConfigParameter.StopCharge)
            {
                doc = ReplyXmlDoc.GetFailureXML(20, "医院内部维护中,暂停该功能");
                return(doc);
            }

            try
            {
                string error_msg = "";
                long   yylsh     = -1;

                PaymentDB pdb = new PaymentDB();
                int       ret = pdb.DB_CreateOrder(brid, bkhm, czje, tkje, brlx, payType,
                                                   out yylsh, 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);

                    XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                    eleMsg.AppendChild(eleValue);

                    XmlElement eleYylsh = doc.CreateElement(AppUtils.Tag_Payment_YYLSH);
                    eleValue.AppendChild(eleYylsh);

                    eleYylsh.InnerText = StringHelper.YylshHasPrefix(yylsh);
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#15
0
        /// <summary>
        /// 查询医生信息
        /// </summary>
        /// <param name="ysdm">医生代码</param>
        /// <returns></returns>
        public XmlDocument Querydoctor(string ysdm)
        {
            XmlDocument doc = new XmlDocument();

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

                QueryDB pdb = new QueryDB();
                int     ret = pdb.DB_QueryDoctor(ysdm, 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 eleYsjj = doc.CreateElement(AppUtils.Tag_Payment_YSJJ);
                        eleValue.AppendChild(eleYsjj);
                        //以下实现数据操作逻辑
                        eleYsjj.InnerText = pdt.jj;

                        XmlElement eleYssc = doc.CreateElement(AppUtils.Tag_Payment_YSSC);
                        eleValue.AppendChild(eleYssc);
                        //以下实现数据操作逻辑
                        eleYssc.InnerText = pdt.sc;
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#16
0
        /// <summary>
        /// 创建预存订单
        /// </summary>
        /// <param name="openid">用户标识</param>
        /// <param name="patientname">病人姓名</param>
        /// <param name="patientidcardno">病人身份证号</param>
        /// <param name="cardno">就诊卡卡号</param>
        /// <param name="patientid">病人ID</param>
        /// <param name="subject">标题</param>
        /// <param name="money">金额</param>
        /// <returns></returns>
        public XmlDocument CreateOrder(string openid, string patientname, string patientidcardno, string cardno, string patientid, string subject,
                                       double money, double tkje, string patienttype)
        {
            XmlDocument doc = new XmlDocument();

            if (WebConfigParameter.StopCharge)
            {
                doc = ReplyXmlDoc.GetFailureXML(20, "医院内部维护中,暂停该功能");
                return(doc);
            }

            try
            {
                string error_msg = "";
                long   tradeno   = -1;

                AilpayPaymentDB pdb = new AilpayPaymentDB();
                int             ret = pdb.DB_CreateOrder(openid, patientname, patientidcardno, cardno, patientid, subject, money, tkje, patienttype,
                                                         out tradeno, 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 eletradeno = doc.CreateElement(AppUtils.Tag_User_Tradeno);
                    eleValue.AppendChild(eletradeno);
                    eletradeno.InnerText = StringHelper.YylshHasPrefix(tradeno);
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#17
0
        /// <summary>
        /// 查询剩余床位数
        /// </summary>
        /// <returns></returns>
        public XmlDocument QueryRemainBeds()
        {
            XmlDocument doc = new XmlDocument();

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

                QueryDB pdb = new QueryDB();
                int     ret = pdb.DB_QueryRemainBeds(out values, 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);
                    foreach (RemainBeds ri in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);

                        XmlElement eleBqmc = doc.CreateElement(AppUtils.Tag_Query_Bqmc);
                        eleValue.AppendChild(eleBqmc);
                        eleBqmc.InnerText = ri.bqmc;

                        XmlElement eleSycw = doc.CreateElement(AppUtils.Tag_Query_Sycw);
                        eleValue.AppendChild(eleSycw);
                        eleSycw.InnerText = Convert.ToString(ri.sycw);

                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }

                return(doc);
            }
            catch (Exception ex)
            {
                return(ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex));
            }
        }
示例#18
0
        /// <summary>
        /// 常用联系人门诊卡绑定
        /// </summary>
        /// <param name="openid">用户标识</param>
        /// <param name="linkmanid">联系人ID</param>
        /// <param name="cardno">就诊卡号</param>
        /// <param name="patientid">病人ID</param>
        /// <returns></returns>
        public XmlDocument FavoriteContactsBindStr(string openid, string linkmanid, string cardno, string patientid)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

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

                string      error_msg;
                PatientInfo patientInfo;

                //以下实现数据操作逻辑
                MzBindCardDB pdb = new MzBindCardDB();
                int          ret = pdb.DB_FavoriteContactsBindStr(openid, linkmanid, cardno, patientid, out patientInfo, out error_msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                    eleMsg.AppendChild(eleValue);

                    XmlElement eleCardtype = doc.CreateElement(AppUtils.Tag_Patient_CardType);
                    eleValue.AppendChild(eleCardtype);
                    eleCardtype.InnerText = patientInfo.bklx;

                    XmlElement eleCardname = doc.CreateElement(AppUtils.Tag_Patient_CardName);
                    eleValue.AppendChild(eleCardname);
                    eleCardname.InnerText = patientInfo.cardname;

                    XmlElement eleCardno = doc.CreateElement(AppUtils.Tag_User_CardNo);
                    eleValue.AppendChild(eleCardno);
                    eleCardno.InnerText = patientInfo.bkhm;
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#19
0
        /// <summary>
        /// 错误或者异常返回 信息
        /// </summary>
        /// <param name="result">返回值 不等于0</param>
        /// <param name="errorMsg">错误信息</param>
        /// <returns></returns>
        protected XmlDocument ErrorReturnXml(int result, string errorMsg)
        {
            XmlDocument rtDoc = new XmlDocument();

            if (result > 0)
            {
                rtDoc = ReplyXmlDoc.GetFailureXML(result, errorMsg);
            }
            else
            {
                rtDoc = ReplyXmlDoc.GetExceptionXML(result, errorMsg);
            }

            return(rtDoc);
        }
示例#20
0
        /// <summary>
        /// 化验报告单列表
        /// </summary>
        /// <param name="name">姓名</param>
        /// <param name="idcardno">身份证号</param>
        /// <returns></returns>
        public XmlDocument LaboratoryTestsReportList(string name, string idcardno)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

            doc.AppendChild(root);

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

                ArrayList values    = new ArrayList();
                string    error_msg = "";

                int ret = -1;

                AilpayQueryReportDB pdb = new AilpayQueryReportDB();
                ret = pdb.DB_AilpayQueryReport(name, idcardno, out values, out error_msg);

                if (ret == 0 && null != values && values.Count > 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (AlipayReportList ri in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);

                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(ri.GetType(), ri);
                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#21
0
        /// <summary>
        /// 检查预约所有排队前十人员列表信息
        /// <returns></returns>
        public XmlDocument CheckReservationReportQueueList()
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

            doc.AppendChild(root);

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

                string    msg    = "";
                ArrayList values = new ArrayList();

                QueryOrderDB pdb = new QueryOrderDB();
                int          ret = pdb.DB_CheckReservationReportQueueList(out values, out msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (CheckReservationReportList ri in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);


                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(ri.GetType(), ri);
                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }

                return(doc);
            }
            catch (Exception ex)
            {
                return(ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex));
            }
        }
示例#22
0
        /// <summary>
        /// 住院费用信息
        /// </summary>
        /// <param name="inpatientno ">住院号码</param>
        /// <param name="costdate ">费用日期 </param>
        /// <param name="paymentparameters">通知参数</param>
        /// <returns></returns>
        public XmlDocument zyCostInfo(string inpatientno, string costdate)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

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

                string    error_msg;
                ArrayList values;

                //以下实现数据操作逻辑
                AilpayPaymentDB pdb = new AilpayPaymentDB();
                int             ret = pdb.DB_zyCostInfo(inpatientno, costdate, out values, out error_msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (zyCostInfo cost in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(cost.GetType(), cost);
                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }

                return(doc);
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#23
0
        /// <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);
        }
示例#24
0
        /// <summary>
        /// 取消预存订单
        /// </summary>
        /// <param name="openid">用户标识</param>
        /// <param name="patientname">病人姓名</param>
        /// <param name="patientid">病人ID</param>
        /// <param name="tradeno">订单号</param>
        /// <returns></returns>
        public XmlDocument CancelPredepositList(string openid, string patientname, string patientid, long yylsh)
        {
            XmlDocument doc = new XmlDocument();

            try
            {
                string msg = "";

                AilpayPaymentDB pdb = new AilpayPaymentDB();
                int             ret = pdb.DB_CancelPredepositList(openid, patientname, patientid, yylsh, out 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 eleYylsh = doc.CreateElement(AppUtils.Tag_User_Tradeno);
                    eleValue.AppendChild(eleYylsh);
                    eleYylsh.InnerText = StringHelper.YylshHasPrefix(yylsh);
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }

            return(doc);
        }
示例#25
0
        /// <summary>
        /// 医生停诊信息列表
        /// </summary>
        /// <param name="pageindex">访问页码</param>
        /// <param name="pagesize">每页行数</param>
        /// <returns></returns>
        public XmlDocument DoctorInfoTingZhen(int pageindex, int pagesize)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

            doc.AppendChild(root);

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

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

                DoctorInforDB pdb = new DoctorInforDB();
                int           ret = pdb.DB_DoctorInfoTingZhen(pageindex, pagesize, out _list, out error_msg);

                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (AlipayDoctorInfoTingZhen ri in _list)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleMsg.AppendChild(eleValue);
                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(ri.GetType(), ri);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#26
0
        /// <summary>
        /// 医生信息列表_按姓名查
        /// </summary>
        /// <param name="name">医生姓名</param>
        /// <param name="pageindex">访问页码</param>
        /// <param name="pagesize">每页行数</param>
        /// <returns></returns>
        public XmlDocument DctorInfoXingming(string name, int pageindex, int pagesize)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

            doc.AppendChild(root);


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

                DoctorInforDB pdb = new DoctorInforDB();
                string        msg;
                ArrayList     values;
                int           ret = pdb.DB_DctorInfoXingming(name, pageindex, pagesize, out values, out msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (AlipayDoctorInfo ri in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(ri.GetType(), ri);
                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }

                return(doc);
            }
            catch (Exception ex)
            {
                return(ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex));
            }
        }
示例#27
0
        /// <summary>
        /// 门诊号源信息
        /// </summary>
        /// <param name="doctorcode">医生代码</param>
        /// <param name="scheduleseq">排班流水号</param>
        /// <param name="shiftcode">排班日期</param>
        /// <returns></returns>
        public XmlDocument mzReservationInfor(string doctorcode, string scheduleseq, string shiftcode)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

            doc.AppendChild(root);

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

                QueryOrderDB pdb = new QueryOrderDB();
                string       msg;
                ArrayList    values;
                int          ret = pdb.DB_mzReservationInfor(doctorcode, scheduleseq, shiftcode, out values, out msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (AlipayQueryOrderSeq ri in values)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(ri.GetType(), ri);
                        eleMsg.AppendChild(eleValue);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, msg);
                }

                return(doc);
            }
            catch (Exception ex)
            {
                return(ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex));
            }
        }
示例#28
0
        /// <summary>
        /// 获得门诊卡列表
        /// </summary>
        /// <param name="idcardno">身份证号</param>
        /// <param name="name">姓名</param>
        /// <returns></returns>
        public XmlDocument GetmzkListStr(string idcardno, string name)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

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

                string    error_msg;
                ArrayList list;
                //以下实现数据操作逻辑
                MzBindCardDB pdb = new MzBindCardDB();

                int ret = pdb.DB_GetmzkListStr(idcardno, name, out list, out error_msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (PatientInfo patientInfo in list)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleMsg.AppendChild(eleValue);
                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(patientInfo.GetType(), patientInfo);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#29
0
        /// <summary>
        /// 病人药品服用信息
        /// </summary>
        /// <param name="cflsh">处方流水号</param>
        /// <returns></returns>
        public XmlDocument PatientsTakingDrugsInfor(string cflsh)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

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

                string    error_msg;
                ArrayList list;
                //以下实现数据操作逻辑
                PatientMedicationDB pdb = new PatientMedicationDB();

                int ret = pdb.DB_PatientsTakingDrugsInfor(cflsh, out list, out error_msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (Patientmedication ri in list)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleMsg.AppendChild(eleValue);
                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(ri.GetType(), ri);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }
示例#30
0
        /// <summary>
        /// 获得常用联系人信息列表
        /// </summary>
        /// <param name="openid">身份证号</param>
        /// <param name="linkmanid">联系人ID </param>
        /// <returns></returns>
        public XmlDocument FavoriteContactsListStr(string openid, string linkmanid)
        {
            XmlDocument doc  = new XmlDocument();
            XmlElement  root = doc.CreateElement(AppUtils.Tag_REXML_Root);

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

                //以下实现数据操作逻辑
                UserRegisterDB pdb = new UserRegisterDB();
                string         error_msg;
                ArrayList      _list;
                int            ret = pdb.DB_FavoriteContactsListStr(openid, linkmanid, out _list, out error_msg);
                if (ret == 0)
                {
                    XmlElement eleResult = doc.CreateElement(AppUtils.Tag_REXML_Result);
                    eleResult.InnerText = AppUtils.Value_Return_Success;
                    root.AppendChild(eleResult);

                    foreach (UserInfo info in _list)
                    {
                        XmlElement eleValue = doc.CreateElement(AppUtils.Tag_REXML_Value);
                        eleMsg.AppendChild(eleValue);
                        eleValue.InnerXml = XMLHelper.SerializeClassFileds(info.GetType(), info);
                    }
                }
                else
                {
                    doc = ErrorReturnXml(ret, error_msg);
                }
            }
            catch (Exception ex)
            {
                doc = ReplyXmlDoc.GetExceptionXML(AppUtils.Default_Exception_Code, ex);
            }
            return(doc);
        }