Visualizzazione dei risultati da 1 a 10 su 13

Visualizzazione discussione

  1. #2
    Pagina .cshtml

    codice:
    @model PagedList.IPagedList<RegistroPrivacy.Models.RPTrattamento>
    @using PagedList.Mvc;
    @using SocietaModelProperties;
    
    
    @{
        ViewBag.Title = SocietaModelProperties.ricercaTratt;
    }
    
    
    <div class="panel">
        <div class="container">
            <div class="row">
                <div class="col-sm-12">
                    <h2 class="text-center">@ViewBag.Title</h2>
    
    
                    <hr />
    
    
                    <table>
                        <tr>
                            <td class="col-md-1"><button id="toggleFiltru" class="btn btn-info-custom col-lg-12">Filtro</button></td>
                            <td class="col-md-10"></td>
                            <td class="col-md-1"><a href="@Url.Action("Create")" class="btn btn-next-custom col-lg-12"> Nuovo@*@SocietaModelProperties.nuovoTratt*@ <span class="glyphicon glyphicon-plus-sign"></span> </a></td>
                        </tr>
                    </table>
    
    
                    @using (Html.BeginForm("Index", "RPTrattamento", FormMethod.Get, new { id = "cercaTratt" }))
                    {
                        <br />
                    
                        <table id="filtru" class="col-lg-12" style="display:none;">
                            <tr>
                                <td class="col-lg-3">
                                    <div class="btn-group">
                                        @Html.DropDownList("userId", new SelectList(ViewBag.usersSocieta, "Id", "UserName", ViewBag.searchedUser), "-Utente-", new { @class = "form-control align-middle col-lg-12", style = "padding-bottom:3px;" })
                                    </div>
                                </td>
                                <td class="col-lg-3">
                                    <div class="btn-group col-sm-12">
                                        @Html.DropDownList("societaId", new SelectList(ViewBag.allSoc, "Id", "NomeSocieta", ViewBag.searchedSocieta), "-Società-", new { @class = "form-control align-middle col-lg-12", style = "padding-bottom:3px;", id = "societaSelect" })
                                    </div>
                                </td>
                                <td class="col-lg-3">
                                    <div class="btn-group col-sm-12">
                                        @Html.DropDownList("ruolo", new SelectList(ViewBag.ruoliSocieta, ViewBag.searchedRuolo), "Ruolo Soc", new { @class = "form-control align-middle col-lg-12", style = "padding-bottom:3px;" })
                                    </div>
                                </td>
                                <td class="col-lg-3">
                                    <div class="btn-group col-sm-12">
                                        @Html.DropDownList("stato", new SelectList((List<string>)ViewBag.statoTratt, (string)ViewBag.searchedStato), "Stato", new { @class = "form-control align-middle col-lg-12", style = "padding-bottom:3px;" })
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="col-lg-2">
                                    <div class="input-group">
                                        @Html.TextBox("finalitaString", ViewBag.CurrentFilter as string, new { @class = "form-control", placeholder = "Finalita" })
                                    </div>
                                </td>
                                <td class="col-md-2">
                                    <div class="input-group col-lg-12">
                                        @Html.TextBox("categDati", ViewBag.categDati as string, new { @class = "form-control", placeholder = "Categoria Dati" })
                                    </div>
                                </td>
                                <td class="col-md-2">
                                    <div class="input-group col-lg-12">
                                        @Html.TextBox("funzioneString", ViewBag.funzioneString as string, new { @class = "form-control", placeholder = "Funzioni" })
                                    </div>
                                </td>
    
    
                                <td class="col-md-2">
                                    <div class="input-group col-lg-12">
                                        @Html.TextBox("applicativoString", ViewBag.applicativoString as string, new { @class = "form-control", placeholder = "Applicativo" })
                                    </div>
                                </td>
                                </tr>
                                <tr>
                                <td class="text-center"><button type="button" class="btn btn-danger-custom" onclick="location.href='@Url.Action("Index", "RPTrattamento")'">Reset</button></td>
                                <td class="col-md-2">
                                    <div class="input-group col-lg-12">
                                        @Html.TextBox("aggiornamentoDa", ViewBag.aggiornamentoDa as string, new { @class = "form-control", type = "date" })
                                    </div>
                                </td>
                                <td class="col-md-2 ">
                                    <div class="input-group col-lg-12">
                                        @Html.TextBox("aggiornamentoA", ViewBag.aggiornamentoA as string, new { @class = "form-control", type = "date" })
                                    </div>
                                </td>
                                
                                <td class="text-center"><button class="btn btn-info-custom">Cerca <span class="glyphicon glyphicon-search" onclick="document.getElementById('cercaTratt').submit();"></span></button></td>
                            </tr>
                        </table>
                    }
    
    
                    <br />
    
    
                    <table class="table table-striped table-custom">
                        <thead>
                            <tr>
                                <th>
                                    <a href="@Url.Action("Index", new { sortOrder = ViewBag.IdSortParam, currentFilter=ViewBag.CurrentFilter, societaId = ViewBag.searchedSocieta, userId = ViewBag.searchedUser, ruolo = ViewBag.searchedRuolo, categDati = ViewBag.categDati, funzioneString = ViewBag.funzioneString, applicativoString = ViewBag.applicativoString, aggiornamentoDa = ViewBag.aggiornamentoDa, aggiornamentoA = ViewBag.aggiornamentoA, stato = ViewBag.searchedStato})">
                                        @SocietaModelProperties.trattId/ @SocietaModelProperties.trattSocietaId  @if ("descresc".Equals(ViewBag.IdSort))
                                        {@Html.Raw("&darr;") }
                                    else if ("cresc".Equals(ViewBag.IdSort))
                                    { @Html.Raw("&uarr;")}
                                    </a>
                                </th>
                                <th>
                                    @SocietaModelProperties.trattUtenteMod 
                                </th>
                                <th>Società</th>
                                <th>Ruolo</th>
                                <th>Finalità</th>
                                <th>Categorie di dati</th>
                                <th>Funzione</th>
                                <th>Applicativo</th>
                                <th>
                                    <a href="@Url.Action("Index", new { sortOrder = ViewBag.DateSortParam, currentFilter=ViewBag.CurrentFilter, societaId = ViewBag.searchedSocieta, userId = ViewBag.searchedUser, ruolo = ViewBag.searchedRuolo, categDati = ViewBag.categDati, funzioneString = ViewBag.funzioneString, applicativoString = ViewBag.applicativoString, aggiornamentoDa = ViewBag.aggiornamentoDa, aggiornamentoA = ViewBag.aggiornamentoA, stato = ViewBag.searchedStato})">
                                        @SocietaModelProperties.trattDataMod @if ("descresc".Equals(ViewBag.DateSort))
                                        {@Html.Raw("&darr;") }
                                    else if ("cresc".Equals(ViewBag.DateSort))
                                    { @Html.Raw("&uarr;")}
                                    </a>
    
    
                                </th>
                                <th>
                                    <a href="@Url.Action("Index", new { sortOrder = ViewBag.StatoSortParam, currentFilter=ViewBag.CurrentFilter, societaId = ViewBag.searchedSocieta, userId = ViewBag.searchedUser, ruolo = ViewBag.searchedRuolo, categDati = ViewBag.categDati, funzioneString = ViewBag.funzioneString, applicativoString = ViewBag.applicativoString, aggiornamentoDa = ViewBag.aggiornamentoDa, aggiornamentoA = ViewBag.aggiornamentoA, stato = ViewBag.searchedStato})">
                                        @SocietaModelProperties.trattStato @if ("descresc".Equals(ViewBag.StatoSort))
                                        {@Html.Raw("&darr;") }
                                    else if ("cresc".Equals(ViewBag.StatoSort))
                                    { @Html.Raw("&uarr;")}
                                    </a>
                                </th>
                            </tr>
                        </thead>
                        <tbody class="table-custom-clickable-row">
                            @foreach (var item in Model)
                            {
                                <tr class="clickable-row" data-href="@Url.Action("Details", new { id = item.Id, socId = item.SocietaId })">
                                    <td>
                                        @Html.DisplayFor(modelItem => item.Id)/
    @Html.DisplayFor(modelItem => item.SocietaId)
                                    </td>
                                    <td>@Html.DisplayFor(modelItem => item.userModifica.UserName)</td>
                                    <td>@Html.DisplayFor(modelItem => item.societaTrat.NomeSocieta)</td>
                                    <td>@Html.DisplayFor(modelItem => item.societaTrat.RuoloSocieta)</td>
                                    <td>@Html.DisplayFor(modelItem => item.InformazioniAttivita.Finalita)</td>
                                    <td>@Html.DisplayFor(modelItem => item.InformazioniAttivita.CategoriaDati)</td>
                                    <td>@Html.DisplayFor(modelItem => item.InformazioniAttivita.FunzioneAziendale)</td>
                                    <td>@Html.DisplayFor(modelItem => item.InformazioniAttivita.ApplicativiCorrelati)</td>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.DataModifica)
                                    </td>
                                    <td class="text-center">
                                        @if (item.Stato == RegistroPrivacy.Models.Stato.NonConvalidato)
                                        {
                                            <i class="fa fa-2x fa-dot-circle-o" style="color:gold"></i>
                                        }
                                        else
                                        {
                                            <i class="fa fa-2x fa-dot-circle-o" style="color:green"></i>
                                        }
                                    </td>
                                </tr>
                            }
                        </tbody>
                    </table>
    
    
                    <br />
    
    
                    <div class="col-md-12">
                        <div class="col-md-6 text-left">
                            Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
                            @Html.PagedListPager(Model, page => Url.Action("Index", new { page, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter, societaId = ViewBag.searchedSocieta, userId = ViewBag.searchedUser, ruolo = ViewBag.searchedRuolo, categDati = ViewBag.categDati, funzioneString = ViewBag.funzioneString, applicativoString = ViewBag.applicativoString, aggiornamentoDa = ViewBag.aggiornamentoDa, aggiornamentoA = ViewBag.aggiornamentoA, stato = ViewBag.searchedStato }))
                        </div>
                        <div>
    <input class="btn btn-info-custom" type="button" onclick="GetMessage()" value="Scarica Excel"/>
    <p></p>
                        </div>
                        <div class="col-md-6 text-right">
                            <strong>Trattamenti trovati: @ViewBag.countResult</strong>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    
    <script>
        jQuery(document).ready(function ($) {
            $(".clickable-row").click(function () {
                window.location = $(this).data("href");
            });
        });
    </script>
    
    
    <script>
        $(document).ready(function () {
            $("#toggleFiltru").click(function () {
                $("#filtru").toggle();
            });
        });
    </script>
    
    
    <script>
    function GetMessage() 
    {
    $.get("/RPImport/GetMessage", function (data) 
    {
    $("p").html(data);
    });
    }
    </script>
    
    
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    
    Ultima modifica di RayanHawkins; 03-05-2018 a 15:42

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.