101 lines
6.1 KiB
Plaintext
101 lines
6.1 KiB
Plaintext
@using HotelContracts.ViewModels
|
||
@model List<HotelContracts.ViewModels.RoomViewModel>
|
||
@{
|
||
ViewData["Title"] = "Отчеты";
|
||
Layout = "_Layout";
|
||
}
|
||
<link rel="stylesheet" href="~/css/index.css">
|
||
<div class="">
|
||
<div class="demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid" style="padding: 1rem;
|
||
display: flex;
|
||
justify-content: center;
|
||
flex-direction: column;
|
||
align-items: center;">
|
||
<h6>Создать отчет в формате (.xlsx|.docx) и скачать его @ViewBag.Maitre.Login</h6>
|
||
<form asp-controller="Home" asp-action="CreateReport">
|
||
<div style="display: flex; flex-direction: column;">
|
||
<span>Бронирования</span>
|
||
<div class="mdl-textfield mdl-js-textfield">
|
||
<select name="reservations" id="" class="mdl-textfield__input" multiple="multiple">
|
||
@{
|
||
@foreach (var item in ViewBag.Reservations)
|
||
{
|
||
<option value="@item.Id">#@item.Id</option>
|
||
}
|
||
}
|
||
</select>
|
||
</div>
|
||
<label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="option-1">
|
||
<input type="radio" id="option-1" class="mdl-radio__button" name="options" value="excel" checked>
|
||
<span class="mdl-radio__label">Excel</span>
|
||
</label>
|
||
<label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="option-2">
|
||
<input type="radio" id="option-2" class="mdl-radio__button" name="options" value="word">
|
||
<span class="mdl-radio__label">Word</span>
|
||
</label>
|
||
<button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
|
||
Создать
|
||
</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<div class="demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid" style="padding: 1rem;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;">
|
||
<h6 class="line_label">Создать отчет в формате (.pdf) и отправить его на почту @ViewBag.Maitre.Login</h6>
|
||
<form asp-controller="Home" asp-action="Report" method="post">
|
||
<span><b>Начальная дата</b></span>
|
||
<div class="mdl-textfield mdl-js-textfield">
|
||
<input class="mdl-textfield__input" type="date" name="from">
|
||
</div>
|
||
<span><b>Конечная дата</b></span>
|
||
<div class="mdl-textfield mdl-js-textfield">
|
||
<input class="mdl-textfield__input" type="date" name="to">
|
||
</div>
|
||
<button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
|
||
Отправить
|
||
</button>
|
||
</form>
|
||
</div>
|
||
@{
|
||
if (ViewBag.PreRender != null)
|
||
{
|
||
<div class="demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid" style="padding: 1rem;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;">
|
||
<h6 class="line_label">Данный отчет отправлен на почту @ViewBag.Maitre.Login</h6>
|
||
<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp" style="width: 100%;">
|
||
<thead>
|
||
<tr>
|
||
<th class="mdl-data-table__cell--non-numeric">Фамилия</th>
|
||
<th class="mdl-data-table__cell--non-numeric">Имя</th>
|
||
<th class="mdl-data-table__cell--non-numeric">Отчество</th>
|
||
<th class="mdl-data-table__cell--non-numeric">Заселение</th>
|
||
<th class="mdl-data-table__cell--non-numeric">Выселение</th>
|
||
<th class="mdl-data-table__cell--non-numeric">Набор</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@{
|
||
@foreach (var item in ViewBag.PreRender)
|
||
{
|
||
<tr>
|
||
<td class="mdl-data-table__cell--non-numeric">@item.SecondName</td>
|
||
<td class="mdl-data-table__cell--non-numeric">@item.Name</td>
|
||
<td class="mdl-data-table__cell--non-numeric">@item.LastName</td>
|
||
<td class="mdl-data-table__cell--non-numeric">@item.StartDate.ToShortDateString()</td>
|
||
<td class="mdl-data-table__cell--non-numeric">@item.EndDate.ToShortDateString()</td>
|
||
<td class="mdl-data-table__cell--non-numeric">
|
||
@item.GetCleaningInstruments()
|
||
</td>
|
||
</tr>
|
||
}
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
}
|
||
</div> |