You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Txgy.RBS.DbModel.Models;
|
|
using Txgy.RBS.DTO;
|
|
using Txgy.RBS.Framework.Api;
|
|
using Txgy.RBS.IServices;
|
|
using Txgy.RBS.Services;
|
|
|
|
namespace Txgy.RBS.Server.WebApi.Controllers
|
|
{
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
public class ResultInfoController : ControllerBase
|
|
{
|
|
private readonly IResultInfoService _resultInfoService;
|
|
|
|
public ResultInfoController(ILogger<ResultInfoController> logger, IResultInfoService resultInfoService)
|
|
{
|
|
this._resultInfoService = resultInfoService;
|
|
}
|
|
[HttpPost]
|
|
public ApiResult AddProjectInfo(ResultJsonDTO resultJsonDTO)
|
|
{
|
|
return _resultInfoService.AddResultInfo(resultJsonDTO);
|
|
}
|
|
|
|
[HttpDelete("{id}")]
|
|
public ApiResult DeleteResultInfo(int id)
|
|
{
|
|
return _resultInfoService.DeleteResultInfo(id);
|
|
}
|
|
|
|
[HttpPost]
|
|
public ApiResult UpdateResultInfo(ResultJsonDTO resultJsonDTO)
|
|
{
|
|
return _resultInfoService.UpdateResultInfo(resultJsonDTO);
|
|
}
|
|
|
|
[HttpGet("{id}")]
|
|
public ResultJsonDTO GetProjectInfo(int id)
|
|
{
|
|
return _resultInfoService.GetResultInfo(id);
|
|
}
|
|
|
|
[HttpGet]
|
|
public List<ResultJsonDTO> GetAllResultInfo()
|
|
{
|
|
return _resultInfoService.GetAllResultInfo();
|
|
}
|
|
}
|
|
}
|