Továbbfejlesztés

This commit is contained in:
2025-04-04 12:42:47 +02:00
parent de8b95eda1
commit 5b1f7fb642
15 changed files with 1130 additions and 164 deletions
@@ -165,6 +165,48 @@ namespace WorkFlowCheck.Web.Services
}
return retVal;
}
public async Task<bool> DeleteEquipment(int id)
{
string endpoint = $"{_httpClient.BaseAddress}api/Sync/DeleteEquipment/{id}";
var retVal = false;
try
{
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<bool>>(endpoint);
if (response != null)
{
if (response.IsSuccess)
{
return response.Data;
}
}
}
catch (Exception ex)
{
Log.Error(ex.Message);
}
return retVal;
}
public async Task<bool> DeleteCheckPoint(int id)
{
string endpoint = $"{_httpClient.BaseAddress}api/Sync/DeleteCheckPoint/{id}";
var retVal = false;
try
{
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<bool>>(endpoint);
if (response != null)
{
if (response.IsSuccess)
{
return response.Data;
}
}
}
catch (Exception ex)
{
Log.Error(ex.Message);
}
return retVal;
}
public async Task<ApiResponseDTO<CheckPointDTO>> UpdateCheckPoint(CheckPointDTO checkPointDTO)
{
@@ -7,12 +7,13 @@ namespace WorkFlowCheck.Web.Services.Interfaces
{
Task<CheckPointDTO> GetCheckPoint(int id);
//Task<bool> DeleteCheckpoint(int id);
Task<bool> DeleteCheckpoint(int id);
Task<List<CheckPointDTO>> GetAllCheckPoints();
Task<ApiResponseDTO<CheckPointDTO>> UpdateCheckPoint(CheckPointDTO checkPointDTO);
Task<EquipmentDTO> GetEquipment(int id);
Task<bool> EquipmentLocation(int id);
Task<List<EquipmentDTO>> GetAllEquipments();
Task<ApiResponseDTO<EquipmentDTO>> UpdateEquipment(EquipmentDTO equipmentDTO);