Egy kis lapozás ...
This commit is contained in:
@@ -43,6 +43,29 @@ namespace WorkFlowCheck.API.Controllers
|
||||
|
||||
return retVal;
|
||||
}
|
||||
[HttpGet("DeleteCheckPoint/{id}")]
|
||||
public async Task<ApiResponseDTO<bool>> DeleteCheckpointAsync(int id)
|
||||
{
|
||||
var retVal = new ApiResponseDTO<bool>()
|
||||
{
|
||||
IsSuccess = true,
|
||||
};
|
||||
var response = await _syncService.DeleteCheckPointAsync(id);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
|
||||
retVal.IsSuccess = true;
|
||||
retVal.Data = response;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal.IsSuccess = false;
|
||||
retVal.Errors.Add("No data!");
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
[HttpGet("GetAllCheckPoints")]
|
||||
public async Task<ApiResponseDTO<List<CheckPointDTO>>> GetAllCheckpointsAsync()
|
||||
{
|
||||
@@ -132,6 +155,29 @@ namespace WorkFlowCheck.API.Controllers
|
||||
|
||||
return retVal;
|
||||
}
|
||||
[HttpGet("DeleteEquipment/{id}")]
|
||||
public async Task<ApiResponseDTO<bool>> DeleteEquipmentAsync(int id)
|
||||
{
|
||||
var retVal = new ApiResponseDTO<bool>()
|
||||
{
|
||||
IsSuccess = true,
|
||||
};
|
||||
var response = await _syncService.DeleteEquipmentAsync(id);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
|
||||
retVal.IsSuccess = true;
|
||||
retVal.Data = response;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal.IsSuccess = false;
|
||||
retVal.Errors.Add("No data!");
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
[HttpGet("GetAllEquipments")]
|
||||
public async Task<ApiResponseDTO<List<EquipmentDTO>>> GetAllEquipmentsAsync()
|
||||
{
|
||||
@@ -201,6 +247,29 @@ namespace WorkFlowCheck.API.Controllers
|
||||
|
||||
return retVal;
|
||||
}
|
||||
[HttpGet("DeleteLocation/{id}")]
|
||||
public async Task<ApiResponseDTO<bool>> DeleteLocationAsync(int id)
|
||||
{
|
||||
var retVal = new ApiResponseDTO<bool>()
|
||||
{
|
||||
IsSuccess = true,
|
||||
};
|
||||
var response = await _syncService.DeleteLocationAsync(id);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
|
||||
retVal.IsSuccess = true;
|
||||
retVal.Data = response;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal.IsSuccess = false;
|
||||
retVal.Errors.Add("No data!");
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
[HttpGet("GetAllLocations")]
|
||||
public async Task<ApiResponseDTO<List<LocationDTO>>> GetAllLocationsAsync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user