Alap töréls Web Locations működik.

This commit is contained in:
2025-04-04 11:30:06 +02:00
parent fa48365d98
commit de8b95eda1
6 changed files with 87 additions and 44 deletions
@@ -144,6 +144,27 @@ namespace WorkFlowCheck.Web.Services
return retVal;
}
public async Task<bool> DeleteLocation(int id)
{
string endpoint = $"{_httpClient.BaseAddress}api/Sync/DeleteLocation/{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)
{
@@ -5,8 +5,9 @@ namespace WorkFlowCheck.Web.Services.Interfaces
{
public interface IBaseStockService
{
Task<CheckPointDTO> GetCheckPoint(int id);
//Task<bool> DeleteCheckpoint(int id);
Task<List<CheckPointDTO>> GetAllCheckPoints();
Task<ApiResponseDTO<CheckPointDTO>> UpdateCheckPoint(CheckPointDTO checkPointDTO);
@@ -16,6 +17,7 @@ namespace WorkFlowCheck.Web.Services.Interfaces
Task<ApiResponseDTO<EquipmentDTO>> UpdateEquipment(EquipmentDTO equipmentDTO);
Task<LocationDTO> GetLocation(int id);
Task<bool> DeleteLocation(int id);
Task<List<LocationDTO>> GetAllLocations();
Task<ApiResponseDTO<LocationDTO>> UpdateLocation(LocationDTO LocationDTO);