Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model List<SisMin.Models.REGISTRO_ING>
- @{
- var grid = new WebGrid(canPage: true, rowsPerPage: 7);
- grid.Bind(source: Model, rowCount: ViewBag.TotalRows, autoSortAndPage: false);
- }
- <link href="~/Content/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
- <link href="~/Content/css/bootstrap-datetimepicker.css" rel="stylesheet" />
- <h2>LISTA DE INGRESOS</h2>
- <div class="form-group" style="text-align: center;">
- <div class="control-label col-md-1">
- </div>
- <div class="col-md-10">
- <b> <b>PESO TOTAL EN CANCHA:</b > <b style="color:red"> @ViewBag.suma T </b> </b>
- </div>
- </div>
- <br />
- <nav class="navbar navbar-default">
- <div class="container-fluid">
- <div class="navbar-header">
- <a href="#" class="navbar-brand">Buscar</a>
- </div>
- <div class="collapse navbar-collapse" style="float: left;">
- @using (Html.BeginForm("Index", "REGISTRO_ING", FormMethod.Get, new { @class = "navbar-form navbar-left", @style = "float: left; " }))
- {
- <div class="form-group">
- <input type="text" value="@ViewBag.search" name="search" class="form-control" placeholder="buscar" />
- </div>
- <b>DE: </b>
- <div class="form-group input-group-sm">
- <input type="text" value="@ViewBag.inicio" name="inicio" id="inicio" class="form-control form_datetime" placeholder="fecha inicio" autocomplete="off" />
- </div>
- <b>HASTA: </b>
- <div class="form-group input-group-sm">
- <input type="text" value="@ViewBag.sal" name="sal" id="sal" class="form-control form_datetime" placeholder="fecha final" autocomplete="off" />
- </div>
- <button type="submit" class="btn btn-success" value="Search">BUSCAR</button>
- }
- </div>
- </div>
- </nav>
- @using (Html.BeginForm("GETPdf", "REGISTRO_ING", FormMethod.Get, new { @class = "navbar-form navbar-right" }))
- {
- <div class="form-group">
- <input style="visibility:hidden; type="text" value="@ViewBag.search" name="search" class="form-control" placeholder="buscar" />
- </div>
- <div class="form-group input-group-sm">
- <input style="visibility:hidden;" type="text" value="@ViewBag.inicio" name="inicio" id="inicio" class="form-control form_datetime" placeholder="fecha inicio" autocomplete="off" />
- </div>
- <div class="form-group input-group-sm">
- <input style="visibility:hidden;" type="text" value="@ViewBag.sal" name="sal" id="sal" class="form-control form_datetime" placeholder="fecha final" autocomplete="off" />
- </div>
- <button type="submit" class="btn btn-success" style="background:#C61313" value="Search"> Exportar a PDF</button>
- }
- <p>
- @Html.ActionLink("AGREGAR INGRESO", "Create")
- </p>
- <table class="table">
- <tr>
- <th>
- ID
- </th>
- <th>
- PROCEDENCIA
- </th>
- <th>
- FECHA INGRESO
- </th>
- <th>
- RUC
- </th>
- <th>
- RAZON SOCIAL
- </th>
- <th>
- PLACA
- </th>
- <th>
- DNI C.
- </th>
- <th>
- CONDUCTOR
- </th>
- <th>
- PESO
- </th>
- <th>
- OBSERVACIÓN
- </th>
- <th></th>
- </tr>
- @foreach (var item in Model)
- {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.ID)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.PROCEDENCIA)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.HORA_FECHA_INGRESO)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.RUC)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.RAZON_SOCIAL)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.PLACA)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.DNI_cond)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.NAME_CONDUCTOR)
- </td>
- <td>
- <b> @Html.DisplayFor(modelItem => item.PESO) T</b>
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.OBSERVACION)
- </td>
- <td>
- @if (User.IsInRole("SuperAdmin") || User.IsInRole("Administrador"))
- {
- @Html.ActionLink("Editar", "Edit", new { id = item.ID })}|
- @if (User.IsInRole("SuperAdmin") || User.IsInRole("Administrador"))
- {
- @Html.ActionLink("Eliminar", "Delete", new { id = item.ID })
- }
- </td>
- </tr>
- }
- </table>
- <br />
- @{
- var totalBill = 0;
- }
- @foreach (var item in Model)
- {
- totalBill = totalBill + @Convert.ToInt32(item.PESO);
- }
- <span class="pull-right" style="margin-right:100px;"><strong>Peso por pagina : </strong> @totalBill</span>
- <div class="row">
- <div class="col-sm-6">
- @grid.PagerList(mode: WebGridPagerModes.All, paginationStyle: "pagination pagination-small pagination-right")
- </div>
- </div>
- @section scripts{
- <script src="~/Content/js/bootstrap-datetimepicker.js"></script>
- <script src="~/Content/js/bootstrap-datetimepicker.min.js"></script>
- <script type="text/javascript">
- $(".form_datetime").datetimepicker({
- format: 'dd/MM/yyyy hh:ii:ss',
- autoclose: true,
- changeMonth: true,
- changeYear: true,
- yearRange: '2018:2025'
- });
- </script>
- <script>
- $(function () {
- try {
- }
- var dir = $('#dir').val();
- var col = $('#col').val();
- var header = $("#th a[href*=" + col + "]");
- if (dir == "Ascending") {
- header.text(header.text() + "\ ")
- }
- if (dir == "Descending") {
- header.text(header.text() + "*")
- }
- }
- )
- </script>
- <script type="text/javascript">
- $(function () {
- $("#orden tbody img").click(function () {
- var orderId = $(this).attr("orderId");
- var fila = $("#fila-" + orderId);
- if (fila.css("display") == "none") {
- fila.css("display", "table-row");
- $(this).attr("src", "@Url.Content("~/Content/img/remove.png")");
- } else
- {
- fila.css("display", "none");
- $(this).attr("src", "@Url.Content("~/Content/img/add.png")");
- }
- });
- });
- </script>
- }
Add Comment
Please, Sign In to add comment