Пример #1
0
        //private Model.DTO.NormalLisItemsRequest request;
        public List <Model.NormalLisItems> GetData(Model.QueryRecoder model, bool queryBycode)
        {
            BLL.Request.NormalLisItemsRequest normalLisItemsRequest = new Request.NormalLisItemsRequest(model);
            normalLisItemsRequest.CreatRequest(queryBycode);
            Model.QueryRecoder queryRecoderModel = normalLisItemsRequest.QueryRecoderModel;
            this.RequestList = normalLisItemsRequest.RequestStr;//临时变量
            List <Model.NormalLisItems> normalLisItems = new List <Model.NormalLisItems>();

            //   保存记录(查询记录数据,更新或添加)  string.IsNullOrEmpty(cq.RequestStr)存在值 修改修!string.IsNullOrEmpty(cq.RequestStr) kaka
            if (normalLisItemsRequest.RequestStr != null && normalLisItemsRequest.RequestStr.Count > 0)
            {
                //   调用接口获取数据
                //  正常这里只会传入一个连接字符串
                foreach (var item in normalLisItemsRequest.RequestStr)
                {
                    string xmlStr = GetWebServiceData(item);
                    string Msg    = "";
                    List <Model.NormalLisItems> tem = new List <Model.NormalLisItems>();
                    //  将xml数据转换成list集合会查询本地数据库去除重复项
                    tem = this.GetList(xmlStr, out Msg);
                    if (string.IsNullOrEmpty(Msg))
                    {
                        normalLisItems.AddRange(tem);
                    }
                }
            }

            return(normalLisItems);
        }
Пример #2
0
        //private Model.DTO.NormalLisItemsRequest request;
        public List<Model.NormalLisItems> GetData(Model.QueryRecoder model, bool queryBycode)
        {
            BLL.Request.NormalLisItemsRequest normalLisItemsRequest = new Request.NormalLisItemsRequest(model);
            normalLisItemsRequest.CreatRequest(queryBycode);
            Model.QueryRecoder queryRecoderModel = normalLisItemsRequest.QueryRecoderModel;
            this.RequestList = normalLisItemsRequest.RequestStr;//临时变量
            List<Model.NormalLisItems> normalLisItems = new List<Model.NormalLisItems>();
            //   保存记录(查询记录数据,更新或添加)  string.IsNullOrEmpty(cq.RequestStr)存在值 修改修!string.IsNullOrEmpty(cq.RequestStr) kaka
            if (normalLisItemsRequest.RequestStr != null && normalLisItemsRequest.RequestStr.Count > 0)
            {
                //   调用接口获取数据
                //  正常这里只会传入一个连接字符串
                foreach (var item in normalLisItemsRequest.RequestStr)
                {
                    string xmlStr = GetWebServiceData(item);
                    string Msg = "";
                    List<Model.NormalLisItems> tem = new List<Model.NormalLisItems>();
                    //  将xml数据转换成list集合会查询本地数据库去除重复项
                    tem = this.GetList(xmlStr, out Msg);
                    if (string.IsNullOrEmpty(Msg))
                    {
                        normalLisItems.AddRange(tem);
                    }
                }
            }

            return normalLisItems;
        }
Пример #3
0
 private List<Model.NormalLisItems> GetNormalLisItemsList(Model.QueryRecoder queryRecoder, bool queryByCode)
 {
     BLL.Request.NormalLisItemsRequest normalLisItemsRequest = new Request.NormalLisItemsRequest(queryRecoder);
     BLL.NormalLisItems normalLisItems = new NormalLisItems();
     //将前台页面传入的model和标识传入到NormalLisItems中产生request
     List<Model.NormalLisItems> list = normalLisItems.GetData(queryRecoder, queryByCode);
     //查询完毕之后的QueryRecoder 对象
     this.queryRecoderModel = normalLisItemsRequest.QueryRecoderModel;
     this.requestStrList = normalLisItems.RequestList;
     return list;
 }