This commit is contained in:
RavilGismatullin 2024-08-27 22:26:31 +04:00
parent 8afd4dd83d
commit c13a1b2a71

View File

@ -267,6 +267,11 @@ namespace ServiceSourceClientApp.Controllers {
[HttpGet]
public IActionResult CreateWordReport(string ids) {
if (string.IsNullOrEmpty(ids)) {
throw new Exception("Íåò âûáðàíûõ çàïèñåé");
}
var fileMemStream = APIClient.GetRequest<byte[]>($"api/Main/CreateWordReport?_ids={ids}");
if (fileMemStream == null) {
@ -278,7 +283,12 @@ namespace ServiceSourceClientApp.Controllers {
[HttpGet]
public IActionResult CreateExcelReport(string ids) {
var fileMemStream = APIClient.GetRequest<byte[]>($"api/Main/CreateXlsxReport?_ids={ids}");
if (string.IsNullOrEmpty(ids)) {
throw new Exception("Íåò âûáðàíûõ çàïèñåé");
}
var fileMemStream = APIClient.GetRequest<byte[]>($"api/Main/CreateXlsxReport?_ids={ids}");
if (fileMemStream == null) {
throw new Exception("Îøèáêà ñîçäàíèÿ îò÷åòà");