<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Main.Master" AutoEventWireup="true" CodeBehind="ParametreListesi.aspx.cs" Inherits="Giza.Web.Moduller.Parametre.ParametreListesi" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <link href="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/bootstrap-table.min.css")%>" rel="stylesheet" />
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/bootstrap-table.min.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/locale/bootstrap-table-tr-TR.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/export/bootstrap-table-export.min.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/export/tableExport.min.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js")%>"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderBreadcrumbs" runat="server">
    <ol class="breadcrumb" style="margin-bottom: 5px;">
        <li><a href="<%= Page.ResolveUrl("~/AnaSayfa.aspx") %>">Anasayfa</a></li>
        <li><a href="<%= Page.ResolveUrl("~/Moduller/Paramtere/ParamtereListesi.aspx") %>">Servis Parametreleri</a></li>
    </ol>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div class="card">
        <div class="card-header">
            <h2>Servis Parametreleri Listesi</h2>
            <ul class="actions">

            </ul>
        </div>
        <div class="card-body card-padding">
            <div id="toolbar" style="padding-right: 25px; padding-left: 5px">
                <div id="btnYenile" class="btn bgm-teal waves-effect" onclick="AramaTemizle();">Aramayı Temizle</div>
            </div>
            <div style="overflow-x: auto;">
                <table id="table"
                    data-toggle="table"
                    data-toolbar="#toolbar"
                    data-ajax="getParametre"
                    data-search="true"
                    data-search-align="left"
                    data-show-refresh="true"
                    data-show-toggle="false"
                    data-show-columns="true"
                    data-show-export="true"
                    data-minimum-count-columns="2"
                    data-show-pagination-switch="false"
                    data-pagination="true"
                    data-id-field="Id"
                    data-page-list="[10, 25, 50, 100, TÜMÜ]"
                    data-locale="tr-TR"
                    data-show-footer="false"
                    data-side-pagination="server"
                    data-sort-name="Id"
                    data-sort-order="asc"
                    data-export-types="['excel', 'pdf']"
                    data-export-options='{
                    "fileName": "ParametreListesi", 
                    "worksheetName": "ParametreListesi1"
                    '>
                    <thead>
                        <tr>
                            <th data-formatter="getEditDeleteLink" data-switchable="false">İşlemler</th>
                            <th data-field="SinifAdi" data-sortable="true">Sınıf Adı</th>
                            <th data-field="NesneAdi" data-sortable="true">Nesne Adı</th>
                            <th data-field="NesneDegeri" data-sortable="true">Nesne Değeri</th>
                            <th data-field="NesneAciklama" data-sortable="true">Nesne Açıklama</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function getParametre(params) {
            var limit = params.data.limit;
            var offset = params.data.offset;
            var search = params.data.search;
            var sort = params.data.sort;
            var order = params.data.order;
            $.ajax({
                url: "<%=Page.ResolveUrl("~/DataService.asmx/GetParametreList")%>",
                data: { limit: limit, offset: offset, search: search, sort: sort, order: order },
                success: function (result) {
                    params.success({
                        total: result.total,
                        rows: result.rows
                    });
                }
            });
        }
        function getEditDeleteLink(value, row) {
            return "<a title='Düzenle' class=\"btn bgm-orange waves-effect\" href='ParametreFormu.aspx?Id=" + row.Id + "'\"> <span style=\"width:6px \" class=\"zmdi zmdi-edit c-white\"> </span> </a> ";
        }


    </script>

</asp:Content>
