Exemplo n.º 1
0
        public List <ShenboContent> InitDt(IDictionary <string, object> strWhere, int startIndex, int endIndex)
        {
            try
            {
                ICustomsCMS      server           = XmlRpcInstance.getInstance();
                TitleNumResponse titleNumResponse = server.findReportContenCount(strWhere[ShenboContent.CONTENT_COLOMUN].ToString());
                if (titleNumResponse.error_code != 0)
                {
                    throw new Exception("连接服务器错误:" + titleNumResponse.error_msg);
                }
                TotalNum = titleNumResponse.titlenum;

                ReportContent_Response response  = server.findReportContentList(strWhere[ShenboContent.CONTENT_COLOMUN].ToString(), startIndex, endIndex);
                ReportContent[]        titlelist = response.reportcontentlist;
                List <ShenboContent>   wrs       = new List <ShenboContent>();
                for (int i = 0; i < titlelist.Length; i++)
                {
                    wrs.Add(new ShenboContent(titlelist[i].id, titlelist[i].logicid, titlelist[i].content, titlelist[i].content_en));
                }
                reportContentArray = response.reportcontentlist;
                return(wrs);
            }
            catch (Exception ex)
            {
                throw new Exception("错误:" + ex.Message);
            }
        }
Exemplo n.º 2
0
        public List <EpidemicInfo> InitDt(IDictionary <string, object> strWhere, int startIndex, int endIndex)
        {
            try
            {
                ICustomsCMS      server           = XmlRpcInstance.getInstance();
                TitleNumResponse titleNumResponse = server.findEpideInfoCount(strWhere[CommonText.TITLE_COLOMUN].ToString(), DateTime.Parse("0001-01-01"), DateTime.Parse("9999-12-30"));
                if (titleNumResponse.error_code != 0)
                {
                    throw new Exception("连接服务器错误:" + titleNumResponse.error_msg);
                }
                TotalNum = titleNumResponse.titlenum;

                Title_Response      title_Response = server.findEpideInfoTitleList(strWhere[CommonText.TITLE_COLOMUN].ToString(), DateTime.Parse("0001-01-01"), DateTime.Parse("9999-12-30"), startIndex, endIndex);
                TitleInfo[]         titlelist      = title_Response.titlelist;
                List <EpidemicInfo> es             = new List <EpidemicInfo>();
                for (int i = 0; i < titlelist.Length; i++)
                {
                    es.Add(new EpidemicInfo(titlelist[i].id, titlelist[i].title, titlelist[i].authod));
                }
                return(es);
            }
            catch (Exception ex)
            {
                throw new Exception("错误:" + ex.Message);
            }
        }