Esempio n. 1
0
        public Task <BaseTreeResponseDto> FindDepartments(BaseTreeSearchReq req)
        {
            BaseTreeResponseDto rsp = new BaseTreeResponseDto();
            var rows = _queryOrgRepository.Get(a => !a.IsDelete && a.CorporationKeyId == req.Identify.CorporationKeyId).Select(a => new BaseTreeDto
            {
                Id   = a.CorporationKeyId.ToString(),
                Name = a.Name,
                PId  = a.ParentKeyId.ToString()
            }).ToList();

            rsp.Tree = rows;
            return(Task.FromResult(rsp));
        }
Esempio n. 2
0
        public Task <BaseTreeResponseDto> FindCorps(BaseTreeSearchReq req)
        {
            BaseTreeResponseDto rsp = new BaseTreeResponseDto();

            rsp.Tree = _queryCorpRepository.Get(a => !a.IsDelete).Select(a => new BaseTreeDto
            {
                Id   = a.CorporationKeyId.ToString(),
                Name = a.Name,
                PId  = Guid.Empty.ToString()
            }).ToList();

            return(Task.FromResult(rsp));
        }