/// <summary>
        /// 预算
        /// </summary>
        /// <param name="b"></param>
        /// <param name="s"></param>
        /// <param name="dt"></param>
        public ResultClass MZ_PreviewCharge(OutpatientClass sDll, Reg.root root)
        {
            ResultClass resultClass = new ResultClass();

            try
            {
                resultClass = iface.OpenDevice(sDll);
                if (resultClass.bSucess)
                {
                    //resultClass = iface.GetPersonInfo(sDll, _cardNo);
                    resultClass = iface.Divide(sDll, root);
                    iface.CloseDevice(sDll);
                }
                else
                {
                    resultClass.oResult = null;
                }
                sDll = null;
            }
            catch (Exception e)
            {
                resultClass.bSucess  = false;
                resultClass.sRemarks = e.Message;
                resultClass.oResult  = null;
            }
            return(resultClass);
        }
Esempio n. 2
0
        /// <summary>
        /// 分解费用
        /// </summary>
        /// <param name="sDll"></param>
        /// <returns></returns>
        public ResultClass Divide(OutpatientClass sDll, Reg.root root)
        {
            string sMome = "";
            bool   bRet  = false;
            string sOut;
            string sIn = XmlUtil.SerializeToXml(root, typeof(Reg.root));

            sDll.Divide(sIn, out sOut);

            AddLog("分解输出数据:");
            AddLog(sOut);
            DivideResult.root divideResult = (DivideResult.root)(XmlUtil.DeserializeFromXml(sOut, typeof(DivideResult.root)));
            XmlDocument       xmlDoc       = GetXmlDoc(sOut);

            CheckOutputState(xmlDoc, out bRet, out sMome);

            ResultClass resultClassTemp = new ResultClass();

            resultClassTemp.bSucess  = bRet;
            resultClassTemp.sRemarks = sMome;

            resultClassTemp.oResult = divideResult;
            return(resultClassTemp);
        }