Esempio n. 1
0
        /// <summary>
        /// 根据场景获取小区
        /// </summary>
        /// <param name="netType"></param>
        /// <param name="cellConditions"></param>
        /// <param name="groupConditions"></param>
        /// <param name="pagination"></param>
        /// <returns></returns>
        public DataSourceResult GetCellByGroup(NetType netType, DataSourceRequest request)
        {
            using (var context = UnitOfWork.Get(netType, DataBaseType.Normal))
            {
                using (var r = new NeRepository(context))
                {
                    var ner = new NeGroupItemRepository(context);

                    var q = from ne in r.GetBasicNeCell()
                            join tg in ner.GetNeGroupItems().Where(request.Filters) on ne.NeCellID equals tg.NeSysID
                            select ne;

                    return(q.ToDataSourceResult <NeCell, NeCell>(request.Sorts, request.Groups, request.Aggregates, request.Page, request.PageSize, null));
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 根据场景获取小区
        /// </summary>
        /// <param name="netType"></param>
        /// <param name="cellConditions"></param>
        /// <param name="groupConditions"></param>
        /// <param name="pagination"></param>
        /// <returns></returns>
        public List <NeCell> GetCellByGroup(NetType netType, IList <IFilterDescriptor> filters)
        {
            using (var context = UnitOfWork.Get(netType, DataBaseType.Normal))
            {
                using (var r = new NeRepository(context))
                {
                    var ner = new NeGroupItemRepository(context);

                    var q = from ne in r.GetBasicNeCell()
                            join tg in ner.GetNeGroupItems().Where(filters) on ne.NeCellID equals tg.NeSysID
                            select ne;


                    return(q.ToList());
                }
            }
        }