示例#1
0
        public async Task <IEnumerable <PowerReport> > GetWorkSpaceReports(WorkSpaceRequestVM workSpaceRequestVm)
        {
            var list = new List <PowerReport>();

            var request = new GetReportRequest {
                Credential = new UserData
                {
                    TenantId      = workSpaceRequestVm.Credential.TenantId,
                    SecretId      = workSpaceRequestVm.Credential.SecretId,
                    ApplicationId = workSpaceRequestVm.Credential.ApplicationId
                }, WorkSpaceId = workSpaceRequestVm.GroupId
            };
            var Result = await _powerService.GetAllReportInWorkSpace(request);

            Result.ForEach(s =>
            {
                list.Add(new PowerReport {
                    Id = s.Id, Name = s.Name
                });
            });
            return(list.ToArray());
        }