2023-05-18 00:47:56 +04:00
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Создание отчёта";
|
2023-05-18 00:04:33 +04:00
|
|
|
}
|
2023-05-18 00:47:56 +04:00
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
<h2 class="display-4">Отчёт по картам за выбранный период</h2>
|
|
|
|
</div>
|
|
|
|
<form method="post">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">Дата начала периода:</div>
|
|
|
|
<div class="col-8">
|
|
|
|
<input id="dateFrom" name="dateFrom" class="form-control" type="date" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-4">Дата конца периода:</div>
|
|
|
|
<div class="col-8">
|
|
|
|
<input id="dateTo" name="dateTo" class="form-control" type="date" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8"></div>
|
|
|
|
<div class="col-4">
|
2023-05-18 21:57:14 +04:00
|
|
|
<input id="createReport" type="submit" value="Сформировать отчёт" class="btn btn-primary" />
|
2023-05-18 00:47:56 +04:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-18 21:57:14 +04:00
|
|
|
<div class="row">
|
|
|
|
<h1>Просмотр отчёта в формате pdf</h1>
|
|
|
|
<object id="forPdf" data={@ViewBag.ReportFile.FileContents} type="application/pdf" width="100%" height="100%">
|
|
|
|
<p>Unable to display PDF file. <a href="/uploads/media/default/0001/01/540cb75550adf33f281f29132dddd14fded85bfc.pdf">Download</a> instead.</p>
|
|
|
|
</object>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<!-- подгрузка отчёта PDF в реальном времени -->
|
|
|
|
<!-- <script>
|
|
|
|
$('#createReport').on('click', function () {
|
|
|
|
load();
|
|
|
|
});
|
|
|
|
|
|
|
|
function load() {
|
|
|
|
byte[] bytes;
|
|
|
|
BinaryFormatter bf = new BinaryFormatter();
|
|
|
|
MemoryStream ms = new MemoryStream();
|
|
|
|
bf.Serialize(ms, fileContent);
|
|
|
|
bytes = ms.ToArray();
|
|
|
|
System.IO.File.WriteAllBytes("hello.pdf", bytes);
|
|
|
|
}
|
|
|
|
</script> -->
|