@using TravelCompanyContracts.BindingModels;

@model ReportBindingModel

@{
    ViewBag.Title = "Report";
}

<div class="text-center">
    <h2 class="display-4">Отчеты</h2>
</div>

@using (Html.BeginForm("Report", "Home", FormMethod.Post))
{

    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <div class="form-group">
                @Html.LabelFor(m => m.DateAfter, "От")
                @Html.TextBoxFor(m => m.DateAfter, new { type = "date", @class = "form-control" })
            </div>
        </div>
        </div>

    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <div class="form-group">
                @Html.LabelFor(m => m.DateBefore, "До")
                @Html.TextBoxFor(m => m.DateBefore, new { type = "date", @class = "form-control" })
            </div>
        </div>
    </div>
   <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <div class="form-group">
        <button type="submit" class="btn btn-primary" formaction="@Url.Action("ReportPdf", "Home")">Сохранить в pdf</button>
        <button type="submit" class="btn btn-primary" formaction="@Url.Action("ReportEmail", "Home")">Отправить pdf по почте</button>
    </div>
    </div>
    </div>

   <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <div class="form-group">
            @Html.LabelFor(m => m.TravelId, "Путешествия")
            @Html.DropDownListFor(m => m.TravelId, new SelectList(ViewBag.TravelList, "Id", "TravelName"), new { @class = "form-control", multiple = "multiple" })
        </div>
        </div>
        </div>
         <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
        <button type="submit" class="btn btn-primary" formaction="@Url.Action("ReportXsl", "Home")">Сохранить в excel</button>
        <button type="submit" class="btn btn-primary" formaction="@Url.Action("ReportWord", "Home")">Сохранить в word</button>
    </div>
    </div>
}