Business és Audit log hozzáadva, WEB-en letölthető
This commit is contained in:
@@ -6,7 +6,15 @@ namespace WorkFlowCheck.Web.Services.Interfaces
|
||||
{
|
||||
Task<List<ImageFileDTO>> GetAllImageFilesAsync();
|
||||
Task<ApiResponseDTO<byte[]>> DownloadFile(string filename);
|
||||
|
||||
Task<List<PDFFileDTO>> GetAllPDFFilesAsync();
|
||||
Task<ApiResponseDTO<byte[]>> DownloadPDFFile(string filename);
|
||||
|
||||
Task<List<LogFileDTO>> GetAllLogAuditFilesAsync();
|
||||
Task<ApiResponseDTO<byte[]>> DownloadAuditLogFile(string filename);
|
||||
|
||||
Task<List<LogFileDTO>> GetAllLogBusinessFilesAsync();
|
||||
Task<ApiResponseDTO<byte[]>> DownloadBusinessLogFile(string filename);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,5 +93,91 @@ namespace WorkFlowCheck.Web.Services
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public async Task<List<LogFileDTO>> GetAllLogAuditFilesAsync()
|
||||
{
|
||||
var endpoint = $"{_httpClient.BaseAddress}api/System/GetAllLogAuditFiles";
|
||||
var retVal = new List<LogFileDTO>();
|
||||
try
|
||||
{
|
||||
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<List<LogFileDTO>>>(endpoint);
|
||||
if (response != null)
|
||||
{
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
return response.Data;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
public async Task<ApiResponseDTO<byte[]>> DownloadAuditLogFile(string filename)
|
||||
{
|
||||
var retVal = new ApiResponseDTO<byte[]>();
|
||||
var endpoint = $"{_httpClient.BaseAddress}api/System/DownloadAuditLogFile/{filename}";
|
||||
try
|
||||
{
|
||||
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<byte[]>>(endpoint);
|
||||
if (response != null)
|
||||
{
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public async Task<List<LogFileDTO>> GetAllLogBusinessFilesAsync()
|
||||
{
|
||||
var endpoint = $"{_httpClient.BaseAddress}api/System/GetAllLogBusinessFiles";
|
||||
var retVal = new List<LogFileDTO>();
|
||||
try
|
||||
{
|
||||
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<List<LogFileDTO>>>(endpoint);
|
||||
if (response != null)
|
||||
{
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
return response.Data;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
public async Task<ApiResponseDTO<byte[]>> DownloadBusinessLogFile(string filename)
|
||||
{
|
||||
var retVal = new ApiResponseDTO<byte[]>();
|
||||
var endpoint = $"{_httpClient.BaseAddress}api/System/DownloadBusinessLogFile/{filename}";
|
||||
try
|
||||
{
|
||||
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<byte[]>>(endpoint);
|
||||
if (response != null)
|
||||
{
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user