Пример #1
0
        /// <summary>
        /// 身份证明类别+身份证明号码查询
        /// </summary>
        /// <param name="idcardtype"></param>
        /// <param name="idcard"></param>
        /// <returns></returns>
        public static string GetPersonPhoto(string idcardtype, string idcard)
        {
            string result = string.Empty;

            try
            {
                result = GetOldService().getDrvImage(idcardtype, idcard, System.Configuration.ConfigurationManager.AppSettings["getDrvimage-old-sn"]);
            }
            catch (Exception exe)
            {
                log.Info(exe);
                return(string.Empty);
            }
            log.Debug("获取照片返回的xmldoc结果为:" + result);
            DrvOldGetImageResponse response = new DrvOldGetImageResponse();

            response.ParseFromXml(result);
            if (response.zp != null && response.zp.Length > 0)
            {
                result = response.zp;
            }
            else
            {
                result = string.Empty;
            }
            return(result);
        }
Пример #2
0
        /// <summary>
        /// 身份证明类别+身份证明号码查询
        /// </summary>
        /// <param name="idcardtype"></param>
        /// <param name="idcard"></param>
        /// <returns></returns>
        public static string GetPersonPhoto(string idcardtype, string idcard)
        {
            string result = string.Empty;
            try
            {
                result = GetOldService().getDrvImage(idcardtype, idcard, System.Configuration.ConfigurationManager.AppSettings["getDrvimage-old-sn"]);

            }
            catch (Exception exe)
            {
                log.Info(exe);
                return string.Empty;
            }
            log.Debug("获取照片返回的xmldoc结果为:"+result);
            DrvOldGetImageResponse response = new DrvOldGetImageResponse();
            response.ParseFromXml(result);
            if (response.zp != null && response.zp.Length > 0)
            {
                result=response.zp;
            }
            else
            {
                result = string.Empty;
            }
            return result;
        }