Новый контроллер
This commit is contained in:
parent
6a2ff9b373
commit
f74486a4df
@ -512,15 +512,28 @@ namespace BankClientApp.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void TransferListReport(List<int> cards, bool word, bool excel)
|
||||
public void TransferListReport(List<int> cards, string format)
|
||||
{
|
||||
if (APIClient.Client == null)
|
||||
{
|
||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||
}
|
||||
APIClient.PostRequest<ReportBindingModel>($"api/report/savetransferword", new ReportBindingModel{
|
||||
|
||||
});
|
||||
switch (format)
|
||||
{
|
||||
case "word":
|
||||
APIClient.PostRequest<ReportBindingModel>($"api/report/savetransferstoword", new ReportBindingModel
|
||||
{
|
||||
SelectedCardIds = cards,
|
||||
});
|
||||
break;
|
||||
case "excel":
|
||||
APIClient.PostRequest<ReportBindingModel>($"api/report/savetransferstoword", new ReportBindingModel
|
||||
{
|
||||
SelectedCardIds = cards,
|
||||
});
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -18,9 +18,13 @@
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<input id="word" type="radio" name="word" GroupName="format"/>
|
||||
</div>
|
||||
<div>
|
||||
<input id="word" type="radio" name="format" value="word" />
|
||||
<label for="word">Получать в формате Word</label>
|
||||
<input id="excel" type="radio" name="excel" GroupName="format"/>
|
||||
</div>
|
||||
<div>
|
||||
<input id="excel" type="radio" name="format" value="excel" />
|
||||
<label for="excel">Получать в формате Excel</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
41
Bank/BankRestApi/Controllers/ReportController.cs
Normal file
41
Bank/BankRestApi/Controllers/ReportController.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using BankContracts.BindingModels;
|
||||
using BankContracts.BusinessLogicsContracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace BankRestApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class ReportController
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IReportLogic _logic;
|
||||
|
||||
public ReportController(ILogger<RequestController> logger, IReportLogic logic)
|
||||
{
|
||||
_logger = logger;
|
||||
_logic = logic;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void SaveRequestsToWord(ReportBindingModel? model)
|
||||
{
|
||||
|
||||
}
|
||||
[HttpPost]
|
||||
public void SaveRequestsToExcel(ReportBindingModel? model)
|
||||
{
|
||||
|
||||
}
|
||||
[HttpPost]
|
||||
public void SaveTransfersToWord(ReportBindingModel? model)
|
||||
{
|
||||
|
||||
}
|
||||
[HttpPost]
|
||||
public void SaveTransfersToExcel(ReportBindingModel? model)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user