Пример #1
0
        public ServiceResponseData GetCasePatFee()
        {
            int patlistid = requestData.GetData <int>(0);
            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.LoginRight = LoginUserInfo;
                request.AddData(patlistid);
            });
            ServiceResponseData retdata = InvokeWcfService("EMRHISInterface.Service", "EmrHomePageDataSourceController", "GetCasePatFee", requestAction);
            DataTable           dtFee   = retdata.GetData <DataTable>(0);
            MedicalCaseFeeInfo  feeInfo = new MedicalCaseFeeInfo();

            if (dtFee != null)
            {
                for (int i = 0; i < dtFee.Rows.Count; i++)
                {
                    SetFeePropertyValues(feeInfo, dtFee.Rows[i][0].ToString(), dtFee.Rows[i][1].ToString());
                }
            }

            DataTable dtTotalFee = retdata.GetData <DataTable>(1);

            if (dtTotalFee != null && dtTotalFee.Rows.Count > 0)
            {
                feeInfo.TotalFee = Convert.ToDecimal(Convert.ToDecimal(dtTotalFee.Rows[0][0]).ToString("0.00"));
                feeInfo.SelfFee  = Convert.ToDecimal(Convert.ToDecimal(dtTotalFee.Rows[0][1]).ToString("0.00"));
            }

            feeInfo.抗菌药物费用 = retdata.GetData <decimal>(2);
            feeInfo.手术治疗费  = feeInfo.手术治疗费 + feeInfo.麻醉费 + feeInfo.手术费;
            responseData.AddData(feeInfo);
            return(responseData);
        }
Пример #2
0
        /// <summary>
        /// 对象属性赋值
        /// </summary>
        /// <param name="item">对象</param>
        /// <param name="propertyName">属性名称</param>
        /// <param name="propertyValue">属性值</param>
        /// <returns>返回MedicalCaseFeeInfo</returns>
        private MedicalCaseFeeInfo SetFeePropertyValues(MedicalCaseFeeInfo item, string propertyName, string propertyValue)
        {
            System.Reflection.PropertyInfo[] properties = item.GetType().GetProperties();
            for (int i = 0; i < properties.Length; i++)
            {
                if (properties[i].Name == propertyName)
                {
                    properties[i].SetValue(item, Convert.ToDecimal(Convert.ToDecimal(propertyValue).ToString("0.00")));
                }
            }

            return(item);
        }