Továbbfejlesztés
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user