Esempio n. 1
0
        protected override IEnumerable <SoftVersionTrackBO> SearchData()
        {
            if (UpdateSection == null)
            {
                return(null);
            }

            var tracks    = _linqOP.GetDataContext <SoftVersionTrack>();
            var softs     = _linqOP.Search <SoftToUpdate>(o => o.IdentificationKey == UpdateSection.SoftKey);
            var customers = _linqOP.Search <Customer>(o => o.IdentificationKey == UpdateSection.CustomerKey);
            var mappings  = _linqOP.GetDataContext <SoftVersionCustomerMapping>();
            var query     = from t in tracks
                            from s in softs
                            where t.SoftID == s.ID
                            from map in mappings
                            where t.ID == map.SoftVersionID
                            from c in customers
                            where map.CustomerID == c.ID
                            select new SoftVersionTrack
            {
                CreateTime       = t.CreateTime,
                ID               = t.ID,
                IsCoerciveUpdate = t.IsCoerciveUpdate,
                SoftID           = t.SoftID,
                UpdatedFileList  = t.UpdatedFileList,
                VersionCode      = t.VersionCode
            };
            var data = query.Select(o => new SoftVersionTrackBO(o)).ToList().OrderByDescending(o => o.CreateTime);

            return(data);
        }
Esempio n. 2
0
        protected override IEnumerable <TEntity> SearchData()
        {
            var all          = LinqOP.GetDataContext <TEntity>();
            var filteredData = (IQueryable <TEntity>)all.Where(FilterDescriptors);

            return(filteredData.ToList());
        }
Esempio n. 3
0
        public CertificationMakeVM()
            : base(VMGlobal.SysProcessQuery.LinqOP)
        {
            Entities = this.SearchData();
            var sizes    = _linqOP.Search <BusiDataDictionary>(o => o.Name == "合格证尺寸");
            var children = _linqOP.GetDataContext <BusiDataDictionary>();
            var query    = from child in children
                           from size in sizes
                           where child.ParentCode == size.Code
                           select child;
            var data = query.ToList();

            _width  = data.FirstOrDefault(o => o.Name == "宽度");
            _height = data.FirstOrDefault(o => o.Name == "高度");
        }