POST hogy tudjunk menteni is.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Serilog;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using WorkFlowCheck.Web.Services.Interfaces;
|
||||
|
||||
@@ -31,10 +32,21 @@ namespace WorkFlowCheck.Web.Pages.BaseStock.CheckPoints
|
||||
CheckPoint = await _baseStockService.GetCheckPoint(id);
|
||||
return new JsonResult(new { data = CheckPoint.CheckListTemplateRowDTO });
|
||||
}
|
||||
|
||||
public async Task OnPostSave([FromBody] CheckPointDTO checkPointDTO)
|
||||
|
||||
public async Task<IActionResult> OnPostSave([FromBody] CheckPointDTO checkPointDTO)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
try
|
||||
{
|
||||
var result = await _baseStockService.UpdateCheckPoint(checkPointDTO);
|
||||
return new JsonResult(new { success = true });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
|
||||
return new JsonResult(new { success = false });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user