Exemple #1
0
        /// <summary>
        /// 通过网页快照查询报关单数据
        /// </summary>
        /// <param name="报关单编号"></param>
        /// <param name="buffer"></param>
        /// <returns></returns>
        public 报关单数据 查询报关单数据(string 报关单编号, string buffer)
        {
            if (string.IsNullOrEmpty(报关单编号) || string.IsNullOrEmpty(buffer))
            {
                return(null);
            }

            报关单数据 bgd = null;

            string[] ss = buffer.Split(new string[] { nbediRead.网页快照分隔符 }, StringSplitOptions.RemoveEmptyEntries);
            if (ss.Length == 0)
            {
                return(null);
            }

            bgd = nbedi.PageAnalyze.Parse查询报关单数据(ss[0], 报关单编号);

            return(bgd);
        }
Exemple #2
0
        public 报关单数据 查询报关单数据2(string 报关单编号, string 报关单pre_entry_id)
        {
            报关单数据 bgd = null;

            try
            {
                string          url      = m_printPageUrl.Replace("#报关单编号#", 报关单pre_entry_id);
                string          htmlInfo = GetLoginedString(url);
                MatchCollection mc       = m_regexPrintPage2.Matches(htmlInfo);
                if (mc.Count == 0)
                {
                    bgd = nbedi.PageAnalyze.Parse查询报关单数据(htmlInfo, 报关单编号);
                }
                else
                {
                    for (int i = 0; i < mc.Count; ++i)
                    {
                        url      = m_detailUrl2.Replace("#报关单pre_entry_id#", mc[i].Groups[1].Value).Replace("#页数#", mc[i].Groups[2].Value);
                        htmlInfo = GetLoginedString(url);

                        if (i == 0)
                        {
                            bgd = nbedi.PageAnalyze.Parse查询报关单数据(htmlInfo, 报关单编号);
                        }
                        else
                        {
                            bgd.网页快照 += 网页快照分隔符 + htmlInfo;
                            bgd.页数++;
                        }
                    }
                }
            }
            catch (Exception)
            {
                //ServiceProvider.GetService<IExceptionProcess>().ProcessWithNotify(ex);
            }
            return(bgd);
        }