|
@using MvcBasicSite.Models.Grid;
@{
ViewBag.Title = Resources.Resource.VisitorLogIndexTitle;
Layout = "~/Views/Shared/_AdminLayout.cshtml";
//
int pageSize = 20;
if (Session["VisitorLogGridSettings"] != null)
{
//
// Get from cache the last page zise selected by the user.
//
GridSettings grid = new GridSettings((string)Session["VisitorLogGridSettings"]);
pageSize = grid.PageSize;
}
//
// Restore the last search params from cache.
//
string startDate = (Session["StartDate"] == null
? string.Empty
: ((DateTime)Session["StartDate"]).ToShortDateString());
string endDate = (Session["EndDate"] == null
? string.Empty
: ((DateTime)Session["EndDate"]).ToShortDateString());
}
<table>
<tr>
<td style="text-align: right; margin-top: 0px;">
@using (Ajax.BeginForm("Search", "VisitorLog",
new AjaxOptions
{
HttpMethod = "GET",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "jqGrid",
OnSuccess = "showGrid()"
}))
{
<table>
<tr>
<td>
<label>@Resources.Resource.VisitorLogIndexFrom</label>
<input type="text" id="from" name="from" data-datepicker="true" value="@startDate" />
</td>
<td>
<label>@Resources.Resource.VisitorLogIndexTo</label>
<input type="text" id="to" name="to" data-datepicker="true" value="@endDate" />
</td>
<td style="text-align: right; margin-top: 0px;">
<input type="submit" name="_search" value="@Resources.Resource.VisitorLogApplyFilter" class="searchButton" />
</td>
</tr>
</table>
}
</td>
</tr>
</table>
<div id="jqGrid">
@Html.Partial("_VisitorLogGrid")
</div>
<script type="text/javascript">
var paramFromView = {
DeleteAllCaption: '@Resources.Resource.VisitorLogDeleteAllCaption',
ClearGridUrl: '@Url.Content("~/VisitorLog/ClearGridData")',
DeleteAllConfirmationMessage: '@Resources.Resource.VisitorLogDeleteAllDataConfirmation',
Url: '@Url.Content("~/VisitorLog/GetData")',
Width: 790,
Height: 464,
Caption: '@Resources.Resource.VisitorLogIndexTitle',
VisitorName: '@Resources.Resource.VisitorLogIndexVisitorName',
StartDate: '@Resources.Resource.VisitorLogIndexStartDate',
EndDate: '@Resources.Resource.VisitorLogIndexEndDate',
WasTimeOut: '@Resources.Resource.VisitorLogIndexWasTimeOut',
Actions: '@Resources.Resource.VisitorLogIndexActions',
PageSize: @pageSize
}
</script>
@section scripts
{
@Content.Script("VisitorLogGrid.js", Url)
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have about 20 years experiences in leading software projects and teams and about 25 years of working experience in software development (SW Developer, SW Lead, SW Architect, SW PM, SW Manager/Group Leader).