Exemplo n.º 1
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);
            }
        }