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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <link href="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-select/dist/css/bootstrap-select.css") %>" rel="stylesheet" />
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-select/dist/js/bootstrap-select.js") %>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-select/dist/js/i18n/defaults-tr_TR.min.js")%>"></script>
    <script type="text/javascript">
        function RaporGrubunaGore() {
            document.getElementById("rdBtnRaporlaraGore").checked = false;
            document.getElementById("buttonDiv").style.display = 'block';
            document.getElementById("comboDiv").style.display = 'none';
            document.getElementById("btnHiddenRapor").click();

        }
        function RaporlaraGore() {
            document.getElementById("rdBtnRaporGrubunaGore").checked = false;
            document.getElementById("buttonDiv").style.display = 'block';
            document.getElementById("comboDiv").style.display = 'block';

            document.getElementById("RaporSiralamaDiv").style.display = 'none';
            document.getElementById("RaporGrupSiralamaDiv").style.display = 'none';
        }
    </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 class="active">Rapor Sıralama</li>
    </ol>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div class="card">
        <div class="card-header">
            <h2>Rapor Sıralama</h2>
        </div>
        <div class="card-body card-padding">
            <div class="row">
                <div class="col-sm-4">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Rapor Grubuna Göre Sırala </p>
                        <asp:RadioButton ID="rdBtnRaporGrubunaGore" ClientIDMode="Static" class="form-control input-sm" onclick="RaporGrubunaGore();" runat="server" />
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Raporlara Göre Sırala</p>
                        <asp:RadioButton ID="rdBtnRaporlaraGore" ClientIDMode="Static" runat="server" onclick="RaporlaraGore();" class="form-control input-sm" />
                    </div>
                </div>
            </div>
            <div id="buttonDiv" style="display: none;">
                <asp:LinkButton ID="btnHiddenRapor" ClientIDMode="Static" runat="server" class="btn btn-danger waves-effect" Style="margin-left: 4px; display: none" OnClick="btnHiddenRapor_Click"></asp:LinkButton>
                <asp:Button ID="btnSave" runat="server" Text="Kaydet" class="btn bgm-green waves-effect pull-right" OnClick="btnSave_Click" />
                <asp:Button ID="btnCancel" runat="server" Text="Vazgeç" class="btn bgm-amber waves-effect m-r-10 pull-right" OnClick="btnCancel_Click" />
            </div>

            <div class="row" id="comboDiv" style="display: none;">
                <div class="col-sm-6">
                    <p class="f-500 m-b-5 f-700">Rapor Grubu</p>
                    <asp:DropDownList ID="cmbRaporGrup" class="selectpicker" AutoPostBack="true" OnSelectedIndexChanged="cmbRaporGrup_SelectedIndexChanged" runat="server" Style="width: 100%;">
                    </asp:DropDownList>
                </div>
            </div>
            <br />
            <div class="form-group fg-line">
                <div id="RaporSiralamaDiv" style="display: none;">
                    <asp:ListView runat="server" ID="LstRaporSiralama">
                        <LayoutTemplate>
                            <table id="items" class="table table-condensed">
                                <thead>
                                    <tr>
                                        <th style="text-align: center; display: none;"></th>
                                        <th style="text-align: center">Veri Tabanı Adı</th>
                                        <th style="text-align: center">Rapor Adı</th>
                                        <th style="text-align: center">Sıra Numarası</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr runat="server" id="itemPlaceholder" />
                                </tbody>
                            </table>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <tr runat="server">
                                <td style="display: none;">
                                    <%#Eval("Id") %>
                                </td>
                                <td style="text-align: center;">
                                    <label><%#Eval("VeriTabaniAdi") %></label>
                                </td>
                                <td style="text-align: center;">
                                    <label><%#Eval("RaporAdi") %></label>
                                </td>
                                <td>
                                    <asp:TextBox class="form-control input-sm" runat="server" placeholder="Sıra Numarası" Text='<%#Eval("SiraNumarasi") %>' Style="text-align: right" onkeypress='return isNumberKey(event)' onblur='decimalBlur(this)'></asp:TextBox>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:ListView>
                </div>
                <div id="RaporGrupSiralamaDiv" style="display: none;">
                    <asp:ListView runat="server" ID="LstRaporGrupSiralama">
                        <LayoutTemplate>
                            <table id="items" class="table table-condensed">
                                <thead>
                                    <tr>
                                        <th style="text-align: center; display: none;"></th>
                                        <th style="text-align: center">Rapor Grup Adı</th>
                                        <th style="text-align: center">Sıra Numarası</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr runat="server" id="itemPlaceholder" />
                                </tbody>
                            </table>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <tr runat="server">
                                <td style="display: none;">
                                    <%#Eval("Id") %>
                                </td>

                                <td style="text-align: center;">
                                    <label><%#Eval("RaporGrupAdi") %></label>
                                </td>
                                <td>
                                    <asp:TextBox class="form-control input-sm" runat="server" placeholder="Sıra Numarası" Text='<%#Eval("SiraNumarasi") %>' Style="text-align: right" onkeypress='return isNumberKey(event)' onblur='decimalBlur(this)'></asp:TextBox>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:ListView>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
