Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" language="javascript">
- $(document).ready(function () {
- oTable = $('#ActivityGrid').dataTable({
- "bJQueryUI": false,
- "bPaginate": true,
- "bLengthChange": true,
- "bFilter": true,
- "bSort": false,
- "bInfo": true,
- "bAutoWidth": false,
- "iDisplayLength": 25,
- "oLanguage": {
- "sLengthMenu": '@Html.Lang("SLG_MN")',
- "sInfo": '@Html.Lang("SLG_VN")',
- "sInfoEmpty": '@Html.Lang("SLG_NN")',
- "sZeroRecords": '@Html.Lang("SLG_NN")',
- "sInfoFiltered": '@Html.Lang("SLG_FD")',
- "sSearch": '@Html.Lang("SLG_RI")'
- },
- "responsive": true
- });
- });
- function ExportTable()
- {
- var table = $('#ActivityGrid').dataTable();
- var flt=""; //I need the filter text here, only the value
- $.ajax({
- cache: false,
- type: "POST",
- url: '@Url.Action("exportTable", "Activity")',
- data:
- {
- 'filter': flt
- },
- success: function () {
- alert("Success");
- },
- error: function () {
- alert("Error");
- }
- });
- }
- </script>
- <div class="container-fluid">
- <div class="row">
- <div class="col-md-12">
- <div class="page-header" style="margin-top: 0px;">
- <h2 style="color: rgb(0,65,146)">@Html.Lang("SLG_C2") <small>@Html.Lang("SLG_A2")</small></h2>
- </div>
- </div>
- </div>
- @if (TempData["Message"] != null)
- {
- <div class="alert alert-warning">
- @TempData["Message"]
- </div>
- <br />
- }
- @using (Html.BeginForm("Archive", "Activity", FormMethod.Post, new { name = "myForm", id = "myForm" }))
- {
- <div class="row">
- <div class="col-md-12">
- <div class="clearfix">
- <div class="pull-left">
- <div class="form-inline">
- <div class="form-group">
- <label>@Html.Lang("SLG_F")</label>
- </div>
- <div class="form-group">
- <label class="sr-only" for="filterDate">Filtro data</label>
- @Html.DropDownList("cmbDate", null, new { @class = "form-control input-sm" })
- </div>
- <div class="form-group">
- <label class="sr-only" for="filterType">Filtro tipo</label>
- @Html.DropDownList("cmbSearchType", null, new { @class = "form-control input-sm" })
- </div>
- <div class="form-group">
- @Html.TextBox("txtSearch", null, new { @class = "form-control input-sm" })
- </div>
- <button type="button" class="btn btn-default btn-sm" onclick="Search();"><span class="glyphicon glyphicon-search"></span> @Html.Lang("SLG_C")</button>
- <button type="button" class="btn btn-default btn-sm" onclick="PopupCenter('@Url.Action("DateSelection", "Activity")', 'Activity', 1);"><span class="fa fa-file-excel-o"></span> @Html.Lang("SLG_E1")</button>
- <button type="button" class="btn btn-default btn-sm" onclick="PopupCenter('@Url.Action("DateSelection", "Activity")', 'Activity', 2);"><span class="fa fa-file-excel-o"></span> @Html.Lang("SLG_E2")</button>
- <button type="button" class="btn btn-default btn-sm" onclick="PopupCenter('@Url.Action("DateSelection", "Activity")', 'Activity', 3);"><span class="fa fa-file-excel-o"></span> @Html.Lang("SLG_E3")</button>
- <button type="button" class="btn btn-sm btn-primary" onclick="ActionLink('Activity','Edit','ActivityId', @newActivity)" title="@Html.Lang("SLG_NC")"><span class="fa fa-plus"></span> @Html.Lang("SLG_NC")</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- }
- <br />
- <div class="row">
- <div class="col-md-12">
- <table class="table table-condensed table-striped table-bordered table-responsive table-hover" id="ActivityGrid">
- <thead>
- <tr>
- <th style="white-space: nowrap;">@Html.Lang("SLG_A")</th>
- <th style="white-space: nowrap;">@Html.Lang("SLG_DATA")</th>
- <th style="white-space: nowrap;">@Html.Lang("SLG_OI")</th>
- <th style="white-space: nowrap;">@Html.Lang("SLG_OF")</th>
- <th style="white-space: nowrap;">@Html.Lang("SLG_C")</th>
- <th style="white-space: nowrap;">@Html.Lang("SLG_O")</th>
- <th style="white-space: nowrap;">@Html.Lang("SLG_F")</th>
- <th class="all"> </th>
- </tr>
- </thead>
- <tbody>
- @for (int i = 0; i < Model.Count; i++)
- {
- <tr class="active" ondblclick="javascript:ActionLink('Activity','Edit','ActivityId', @Model[i].Id);">
- <td>@Model[i].Activity</td>
- <td>@Model[i].DateActivity.ToString(WebAppSettings.DateFormat, CultureInfo.InvariantCulture)</td>
- <td>@Model[i].StartTime.ToString("HH:mm", CultureInfo.InvariantCulture)</td>
- <td>@Model[i].EndTime.ToString("HH:mm", CultureInfo.InvariantCulture)</td>
- @if (Model[i].IdContact > 0)
- {
- ContactModel Contact = new ContactModel().LoadById(Model[i].IdContact);
- <td>@Contact.CompanyName</td>
- }
- else
- {
- <td></td>
- }
- @if (Model[i].IdOperator > 0)
- {
- OperatorModel Operator = new OperatorModel().LoadById(Model[i].IdOperator);
- <td>@Operator.Description</td>
- }
- else
- {
- <td></td>
- }
- <td width="5px" align="center">
- @if (Model[i].ExtraTime)
- {<i class="fa fa-check text-primary fa-lg" aria-hidden="true"></i> }
- </td>
- <td width="40px" class="text-right" style="white-space: nowrap;">
- <a title="@Html.Lang("SLG_MC")" href="javascript:ActionLink('Activity','Edit','ActivityId', @Model[i].Id);" class="btn btn-xs btn-link"><span class="fa fa-pencil" title="@Html.Lang("SLG_MC")"></span></a>
- <a title="@Html.Lang("SLG_EC")" href="javascript:ActionLink('Activity','Delete','ActivityId', @Model[i].Id);" class="btn btn-link btn-xs"><span title="@Html.Lang("SLG_EC")" class="fa fa-trash"></span></a>
- </td>
- </tr>
- }
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div id="dialogContact"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement