Equipment, Lokáció de még csak a lista
This commit is contained in:
@@ -33,7 +33,51 @@ namespace WorkFlowCheck.Web.Services
|
||||
return retVal;
|
||||
|
||||
}
|
||||
|
||||
public async Task<List<EquipmentDTO>> GetAllEquipments()
|
||||
{
|
||||
string endpoint = $"{_httpClient.BaseAddress}api/Sync/GetAllEquipments";
|
||||
var retVal = new List<EquipmentDTO>();
|
||||
try
|
||||
{
|
||||
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<List<EquipmentDTO>>>(endpoint);
|
||||
if (response != null)
|
||||
{
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
return response.Data;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
return retVal;
|
||||
|
||||
}
|
||||
public async Task<List<LocationDTO>> GetAllLocations()
|
||||
{
|
||||
string endpoint = $"{_httpClient.BaseAddress}api/Sync/GetAllLocations";
|
||||
var retVal = new List<LocationDTO>();
|
||||
try
|
||||
{
|
||||
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<List<LocationDTO>>>(endpoint);
|
||||
if (response != null)
|
||||
{
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
return response.Data;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
return retVal;
|
||||
|
||||
}
|
||||
|
||||
public async Task<CheckPointDTO> GetCheckPoint(int id)
|
||||
{
|
||||
string endpoint = $"{_httpClient.BaseAddress}api/Sync/GetCheckPoints/{id}";
|
||||
@@ -55,6 +99,27 @@ namespace WorkFlowCheck.Web.Services
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
public async Task<CheckListTemplateRowDTO> GetCheckListTemplateRow(int id)
|
||||
{
|
||||
string endpoint = $"{_httpClient.BaseAddress}api/Sync/GetCheckListTemplateRow/{id}";
|
||||
var retVal = new CheckListTemplateRowDTO();
|
||||
try
|
||||
{
|
||||
var response = await _httpClient.GetFromJsonAsync<ApiResponseDTO<CheckListTemplateRowDTO>>(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,7 +5,10 @@ namespace WorkFlowCheck.Web.Services.Interfaces
|
||||
public interface IBaseStockService
|
||||
{
|
||||
Task<List<CheckPointDTO>> GetAllCheckPoints();
|
||||
Task<List<EquipmentDTO>> GetAllEquipments();
|
||||
Task<List<LocationDTO>> GetAllLocations();
|
||||
Task<CheckPointDTO> GetCheckPoint(int id);
|
||||
Task<CheckListTemplateRowDTO> GetCheckListTemplateRow(int id);
|
||||
Task<ApiResponseDTO<CheckPointDTO>> UpdateCheckPoint(CheckPointDTO checkPoint);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user