示例#1
0
        public async Task <DTO.Persons> GetAllPersons(DTO.StdCollectionInputsId sci)
        {
            System.Linq.IQueryable <ORMModel.Person> q = _db.Person.Where(o => o.CompanyId == sci.Id);

            var retVal = new Persons();

            await retVal.Run(_mapper, q, sci);

            return(_mapper.Map <DTO.Persons>(retVal));
        }
示例#2
0
        public async Task <DTO.Imports> GetAllByPersonMap(DTO.StdCollectionInputsId sci)
        {
            System.Linq.IQueryable <ORMModel.Import> q = _db.Import
                                                         .Where(o => o.PersonMapID == sci.Id);

            var retVal = new Imports();

            await retVal.Run(_mapper, q, sci);

            return(_mapper.Map <DTO.Imports>(retVal));
        }
示例#3
0
        public async Task <DTO.PersonMaps> GetAllMaps(DTO.StdCollectionInputsId sci, long personId)
        {
            System.Linq.IQueryable <ORMModel.PersonMap> q =
                _db.PersonMap.Include(o => o.Columns).Where(o => o.MasterMapId == sci.Id && o.PersonId == personId);

            var retVal = new PersonMaps();

            await retVal.Run(_mapper, q, sci);

            return(_mapper.Map <DTO.PersonMaps>(retVal));
        }
示例#4
0
        public async Task <DTO.Sales> GetAllPerson(DTO.StdCollectionInputsId sci)
        {
            System.Linq.IQueryable <ORMModel.Sale> q =
                _db.Sale.Include(o => o.Import.Map.Person)
                .Where(o => o.Import.CreateBy == sci.Id);

            var retVal = new Sales();

            await retVal.Run(_mapper, q, sci);

            return(_mapper.Map <DTO.Sales>(retVal));
        }
示例#5
0
        public async Task <DTO.PersonMaps> GetAllPersonMaps(DTO.StdCollectionInputsId sci)
        {
            var  list   = (List <DTO.SearchParameter>)sci.SearchParameters;
            long mmapId = list.First(o => o.Column.ToLower() == "mastermapid").Value;

            System.Linq.IQueryable <ORMModel.PersonMap> q =
                _db.PersonMap
                .Include(o => o.Columns)
                .Include(o => o.Person)
                .Where(o => o.MasterMapId == mmapId && o.Person.CompanyId == sci.Id)
            ;

            var retVal = new PersonMaps();

            await retVal.Run(_mapper, q, sci);

            return(_mapper.Map <DTO.PersonMaps>(retVal));
        }