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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <link href="<%= Page.ResolveUrl("~/Content/vendors/bootgrid/jquery.bootgrid.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 src="<%= Page.ResolveUrl("~/Content/vendors/input-mask/input-mask.js") %>"></script>

    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/jquery-autoNumeric/autoNumeric.js") %>"></script>
    <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/cookie/bootstrap-table-cookie.js")%>"></script>

    <link href="<%= Page.ResolveUrl("~/Content/css/imageviewer.css")%>" rel="stylesheet" />
    <script src="<%= Page.ResolveUrl("~/Content/js/imageviewer/imageviewer.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/js/imageviewer/imageviewer.min.js")%>"></script>

    <style type="text/css">
        .bs-item-icon {
            font-size: 65px;
            margin: 0px auto;
            display: block;
            padding: 10px 0px 10px 0px;
            color: #FFF;
            width: 100%;
        }

        .bs-item-title {
            height: 35px;
            text-align: center;
            line-height: 20px;
            color: #014643 !important;
        }

        .bs-item {
            margin-right: 10px;
            margin-bottom: 10px;
            margin-left: 10px;
            padding-left: 0px;
            padding-right: 0px;
            position: static !important;
        }
    </style>
    <script type="text/javascript">

        $(document).ready(function () {
            if ($('.chosen')[0]) {
                $('.chosen').chosen({
                    width: '100%',
                    allow_single_deselect: true
                });
            }

        });


        function pageLoad(sender, args) {
            if (args.get_isPartialLoad()) {
                $('.selectpicker').selectpicker();
            }
            //$('#resimDiv').innerHtml = "<img src='/Content/img/resimyok.png' style='width:100%; height:50%;'>";
        }
        function ControlImage(input) {
            if (input.files && input.files[0]) {
                var file = input.files[0];
                if (!file.type.match('image.*')) {
                    notify("Sadece resim dosyası yükleyebilirsiniz..", "warning");
                    $("#FileUpload1").val('');
                    return;
                }
                var reader = new FileReader();
                reader.onload = (function (theFile) {
                    return function (e) {
                        //document.getElementById('imgPreviewDocument').style.display = "block";
                        //document.getElementById('imgPreviewDocument').src = e.target.result;
                        //document.getElementById('imgPreviewDocument').title = escape(theFile.name);
                        //$('#<%//=resimDiv.ClientID%>').hide();

                        document.getElementById('ImgRaporGorseli').src = e.target.result;
                        document.getElementById('ImgRaporGorseli').title = escape(theFile.name);


                    };
                })(file);
                reader.readAsDataURL(file);
            }
        }

        function DokumanSil(Id) {

            var raporId = <%=Page.Request.QueryString.AllKeys.Contains("Id") ? Page.Request.QueryString.Get("Id").ToString() : "0"%>
            $.ajax({
                type: "POST",
                url: "<%= Page.ResolveUrl("~/Moduller/Rapor/RaporFormu.aspx/DokumaniSil")%>",
                contentType: "application/json; charset=utf-8",
                dataType: 'json',
                data: JSON.stringify({ Id: Id, raporId: raporId }),
                success: function (response) {
                    if (response.d.status == 1) {
                        notify("<b>Başarılı</b></br>" + response.d.message, "success");
                        var element = "#colid_" + Id;
                        //$(element).hide();
                        $(element).fadeOut("slow");

                        $(".AnaResimYap").css("background-color", "#cacaca");
                        if (response.d.anasayfaResmiYapilanId != -1)
                            $("#btnAnaResimYap_" + response.d.anasayfaResmiYapilanId).css("background-color", "#71cc38");

                    }
                    else {
                        notify("<b>Hata</b></br>Kayıt silinirken bir hata oluştu.Hata:" + response.d.message, "danger");
                    }
                },
                error: function (xhr) {
                    console.log(xhr.responseText);
                    notify("<b>Hata JS</b></br>Kayıt silinirken bir hata oluştu. Hata" + xhr.responseText);
                }
            });
        }

        function AnaResimYap(Id) {

            var raporId = <%=Page.Request.QueryString.AllKeys.Contains("Id") ? Page.Request.QueryString.Get("Id").ToString() : "0"%>
            $.ajax({
                type: "POST",
                url: "<%= Page.ResolveUrl("~/Moduller/Rapor/RaporFormu.aspx/AnaResimYap")%>",
                contentType: "application/json; charset=utf-8",
                dataType: 'json',
                data: JSON.stringify({ Id: Id, raporId: raporId }),
                success: function (response) {
                    if (response.d.status == 1) {
                        //notify("<b>Başarılı</b></br>İşlem başarılı", "success");
                        $(".AnaResimYap").css("background-color", "#cacaca");
                        $("#btnAnaResimYap_" + Id).css("background-color", "#71cc38");
                    }
                    else {
                        notify("<b>Hata</b></br>İşlem yürütülürken bir hata oluştu.Hata:" + response.d.message, "danger");
                    }
                },
                error: function (xhr) {
                    console.log(xhr.responseText);
                    notify("<b>Hata JS</b></br>Kayıt silinirken bir hata oluştu. Hata" + xhr.responseText);
                }
            });
        }




    </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/Rapor/RaporListesi.aspx") %>">Raporlar</a></li>
        <li class="active">Rapor Tanımlama</li>
    </ol>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div class="card">
        <div class="card-header">
            <h2>Rapor Tanımlama</h2>
            <ul class="actions">
                <asp:Literal ID="ltrlOnizle" runat="server"></asp:Literal>

            </ul>
        </div>
        <div class="card-body card-padding">
            <asp:UpdatePanel runat="server">
                <ContentTemplate>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Rapor Grup Adı</p>
                                <asp:DropDownList ID="cmbRaporGrup" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Veri Tabanı Adı</p>
                                <asp:DropDownList ID="cmbVeriTabaniAdi" data-live-search="true" ClientIDMode="Static" class="selectpicker" OnSelectedIndexChanged="cmbVeriTabaniAdi_SelectedIndexChanged" AutoPostBack="true" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Rapor View Adı</p>
                                <asp:DropDownList ID="cmbRaporViewAdi" OnSelectedIndexChanged="cmbRaporViewAdi_SelectedIndexChanged" AutoPostBack="true" ClientIDMode="Static" data-live-search="true" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Rapor Adı</p>
                                <asp:TextBox ID="txtRaporAdi" class="form-control input-sm" runat="server" placeholder="Rapor Adı" ValidationGroup="Rapor"></asp:TextBox>
                            </div>
                        </div>


                    </div>
                    <div class="row">
                        <div class="col-sm-3">
                            <div class="form-group">
                                <p class="f-500 m-b-5 f-700">View Sıralama Kolonu</p>
                                <asp:DropDownList runat="server" ID="cmbSiralamaKolonlari" ClientIDMode="Static" data-live-search="true" class="selectpicker" Style="width: 100%">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <p class="f-500 m-b-5 f-700">View Sıralama Değeri</p>
                                <asp:DropDownList runat="server" ID="cmbSiralamaDegeri" ClientIDMode="Static" class="selectpicker" Style="width: 100%">
                                    <asp:ListItem Selected="True" Text="Normal Sıralama (asc)" Value=" asc "></asp:ListItem>
                                    <asp:ListItem Text="Tersten Sıralama (desc)" Value=" desc "></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <asp:UpdatePanel runat="server">
                                <ContentTemplate>
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <div class="form-group fg-line">
                                                <p class="f-500 m-b-5 f-700">Cari Bazlı Rapor</p>
                                                <div class="col-sm-4">
                                                    <div class="fg-line">
                                                        <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                                            <asp:CheckBox ID="chkCariBazli" OnCheckedChanged="chkCariBazli_CheckedChanged" AutoPostBack="true" ClientIDMode="Static" runat="server" />
                                                            <i class="input-helper"></i>
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-6" id="KolonAdiDiv" runat="server">
                                            <div class="form-group fg-line">
                                                <p class="f-500 m-b-5 f-700">Cari Kodu Kolon Adı</p>
                                                <asp:DropDownList ID="cmbFieldAdi" ClientIDMode="Static" data-live-search="true" class="selectpicker" runat="server" Style="width: 100%;">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="chkCariBazli" EventName="CheckedChanged" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="cmbVeriTabaniAdi" EventName="SelectedIndexChanged" />
                    <asp:AsyncPostBackTrigger ControlID="cmbRaporViewAdi" EventName="SelectedIndexChanged" />
                    <asp:AsyncPostBackTrigger ControlID="cmbAltRaporAdi1" EventName="SelectedIndexChanged" />
                    <asp:AsyncPostBackTrigger ControlID="cmbAltRaporAdi2" EventName="SelectedIndexChanged" />
                    <asp:AsyncPostBackTrigger ControlID="cmbAltRaporAdi3" EventName="SelectedIndexChanged" />
                </Triggers>
            </asp:UpdatePanel>
            <div class="row m-b-20">
                <div class="col-sm-3">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Anasayfada Gösterilsin Mi?</p>
                        <div class="col-sm-4">
                            <div class="fg-line">
                                <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                    <asp:CheckBox ID="chkASG" runat="server" />
                                    <i class="input-helper"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-3">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Menüde Gösterilsin Mi?</p>
                        <div class="col-sm-4">
                            <div class="fg-line">
                                <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                    <asp:CheckBox ID="chkMenudeGoster" runat="server" />
                                    <i class="input-helper"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Listelerde Gösterme</p>
                        <div class="col-sm-4">
                            <div class="fg-line">
                                <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                    <asp:CheckBox ID="chkListelerdeGozukme" runat="server" />
                                    <i class="input-helper"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Filtre Zorunluluğu</p>
                        <div class="col-sm-4">
                            <div class="fg-line">
                                <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                    <asp:CheckBox ID="chkFiltreZorunlulugu" runat="server" />
                                    <i class="input-helper"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <p class="f-500 m-b-5 f-700">Raporun Ana Sayfada Görünen Resimleri</p>

                        <%--                        <div id="resimDiv" style="display: block; width: 100px; background-size: cover;" runat="server" class="col-sm-1 col-xs-2 bs-item"></div>--%>

                        <div class="contacts c-profile clearfix row">
                            <asp:Repeater ID="rptDokumanlar" runat="server">
                                <ItemTemplate>
                                    <div class="col-md-2 col-sm-4 col-xs-6" id="colid_<%#Eval("Id")%>">
                                        <div class="c-item">
                                            <a class="ci-avatar" style="max-height: 75px; height: 75px;">
                                                <img id="imgDokumanItem_<%#Eval("Id")%>" src="<%#Eval("KucukVeri") %>" onclick="DokumanGoruntule(<%#Eval("Id")%>);" data-buyukdata="<%#Eval("BuyukVeri") %>" />
                                            </a>

                                            <div class="c-footer">
                                                <button class="waves-effect AnaResimYap" <%#Eval("Disabled") %> id="btnAnaResimYap_<%#Eval("Id")%>" type="button" onclick="AnaResimYap(<%#Eval("Id")%>)" style="<%#Eval("VarsayilanMiRenkKodu") %>"><i class="zmdi zmdi-favorite"></i>Ana Resim</button>

                                                <button class="waves-effect" <%#Eval("Disabled") %> onclick="DokumanSil(<%#Eval("Id")%>);return false" style="background-color: #cc3838; color: #FFF;"><i class="zmdi zmdi-delete"></i>Sil</button>
                                            </div>
                                        </div>
                                    </div>
                                </ItemTemplate>
                            </asp:Repeater>

                        </div>

                    </div>
                </div>
                <div class="col-sm-6">



                    <div class="form-group">
                        <p class="f-500 m-b-5 f-700">Resim Yükle</p>
                        <div class="fg-line">
                             <p>En fazla 1 MB dosya(lar) yükleyebilirsiniz.</p>
                            <div class="col-xs-6">
                                <asp:FileUpload ID="FileUpload1" class="waves-button-input" ClientIDMode="Static" accept="image/*" AllowMultiple="true" onchange="ControlImage(this);" runat="server" />
                           
                            </div>

                            <div class="col-xs-6" style="float: left;width: initial;">
                                <asp:Button ID="btnResimleriYukle" runat="server" Text="Yükle" class="btn bgm-amber waves-effect m-r-10 pull-right" OnClick="btnResimleriYukle_Click" />

                            </div>

                        </div>
                    </div>
                </div>
            </div>


            <div class="row">
                <div class="col-sm-4">

                    <div class="form-group fg-line">
                        <p class="f-500 c-black m-b-15">Rapor İzleme Liste Altı Bilgi</p>

                        <asp:ListBox ID="lstBilgiViewlari" SelectionMode="multiple" data-placeholder="Viewları seçiniz" ClientIDMode="Static" class="chosen" runat="server"></asp:ListBox>

                    </div>
                </div>



            </div>


        </div>
    </div>

    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <%--Alt Rapor Tanımlama--%>
            <div class="card">
                <div class="card-header">
                    <h2>Alt Rapor Tanımlama</h2>
                </div>
                <div class="card-body card-padding">

                    <%--Alt Rapor 1--%>
                    <div class="row">
                        <div class="col-sm-4">

                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Alt Rapor Adı</p>
                                <asp:DropDownList ID="cmbAltRaporAdi1" data-live-search="true" ClientIDMode="Static" class="selectpicker" AutoPostBack="true" OnSelectedIndexChanged="cmbAltRaporAdi1_SelectedIndexChanged" runat="server" Style="width: 100%;">
                                </asp:DropDownList>

                            </div>

                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Master Key Kolonu</p>
                                <asp:DropDownList ID="cmbKeyKolonuMaster1" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Detay Key Kolonu</p>
                                <asp:DropDownList ID="cmbKeyKolonuDetail1" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Aktif</p>
                                <div class="col-sm-4">
                                    <div class="fg-line">
                                        <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                            <asp:CheckBox ID="chkAltRaporAktiflik1" AutoPostBack="true" ClientIDMode="Static" runat="server" />
                                            <i class="input-helper"></i>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <%--END Alt Rapor 1--%>

                    <%--Alt Rapor 2--%>
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Alt Rapor Adı</p>
                                <asp:DropDownList ID="cmbAltRaporAdi2" data-live-search="true" ClientIDMode="Static" class="selectpicker" AutoPostBack="true" OnSelectedIndexChanged="cmbAltRaporAdi2_SelectedIndexChanged" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Master Key Kolonu</p>
                                <asp:DropDownList ID="cmbKeyKolonuMaster2" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Detay Key Kolonu</p>
                                <asp:DropDownList ID="cmbKeyKolonuDetail2" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Aktif</p>
                                <div class="col-sm-4">
                                    <div class="fg-line">
                                        <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                            <asp:CheckBox ID="chkAltRaporAktiflik2" AutoPostBack="true" ClientIDMode="Static" runat="server" />
                                            <i class="input-helper"></i>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <%--END Alt Rapor 2--%>

                    <%--Alt Rapor 3--%>
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Alt Rapor Adı</p>
                                <asp:DropDownList ID="cmbAltRaporAdi3" data-live-search="true" ClientIDMode="Static" class="selectpicker" AutoPostBack="true" OnSelectedIndexChanged="cmbAltRaporAdi3_SelectedIndexChanged" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Master Key Kolonu</p>
                                <asp:DropDownList ID="cmbKeyKolonuMaster3" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Detay Key Kolonu</p>
                                <asp:DropDownList ID="cmbKeyKolonuDetail3" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Aktif</p>
                                <div class="col-sm-4">
                                    <div class="fg-line">
                                        <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                            <asp:CheckBox ID="chkAltRaporAktiflik3" AutoPostBack="true" ClientIDMode="Static" runat="server" />
                                            <i class="input-helper"></i>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <%--END Alt Rapor 3--%>
                    <div class="alert alert-warning alert-dismissible" role="alert" style="visibility: hidden;">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <asp:CustomValidator ID="CustomValidator1" ValidationGroup="Rapor" runat="server" CssClass="control-label" ErrorMessage="Lütfen boş geçilemeyecek alanları doldurunuz" OnServerValidate="Validator_ServerValidate"></asp:CustomValidator>
                    </div>
                </div>
            </div>
            <%--END Alt Rapor Tanımlama--%>

            <%--Rapor İşlem Butonları Tanımlama--%>
            <div class="card">
                <div class="card-header">
                    <h2>İşlem Butonları Tanımlama</h2>
                    <h6 style="color: #b1b7b7;">View tanımlarken eşleşecek kolonun adını <strong>BAGLANTIDEGERI</strong> olarak ayarlayınız</h6>
                </div>
                <div class="card-body card-padding">
                    <%--Button 1--%>
                    <div class="row">
                        <div class="col-sm-4">

                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Buton İşlem Adı</p>
                                <asp:TextBox ID="txtButonAdi1" class="form-control input-sm" runat="server" placeholder="Durum Değiştir" ValidationGroup="Buton"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Sql Cümlesi</p>
                                <asp:TextBox ID="txtButonSqlCumlesi1" class="form-control input-sm" runat="server" placeholder="Update tablo set durum=1" ValidationGroup="Buton"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Sql Cümle Eşleşme Kolonu</p>
                                <asp:TextBox ID="txtSqlCumleEslesmeKolonu1" class="form-control input-sm" runat="server" placeholder="INCKEYNO" ValidationGroup="Buton"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Aktif</p>
                                <div class="col-sm-4">
                                    <div class="fg-line">
                                        <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                            <asp:CheckBox ID="chkButonAktif1" ClientIDMode="Static" runat="server" />
                                            <i class="input-helper"></i>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <%--END Button 1--%>

                    <%--Button 2--%>
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Buton İşlem Adı</p>
                                <asp:TextBox ID="txtButonAdi2" class="form-control input-sm" runat="server" placeholder="Bilgi Değiştir" ValidationGroup="Buton"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Sql Cümlesi</p>
                                <asp:TextBox ID="txtButonSqlCumlesi2" class="form-control input-sm" runat="server" placeholder="Update tablo set CariTel=5425425425" ValidationGroup="Buton"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Sql Cümle Eşleşme Kolonu</p>
                                <asp:TextBox ID="txtSqlCumleEslesmeKolonu2" class="form-control input-sm" runat="server" placeholder="CARI_KOD" ValidationGroup="Buton"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Aktif</p>
                                <div class="col-sm-4">
                                    <div class="fg-line">
                                        <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                            <asp:CheckBox ID="chkButonAktif2" ClientIDMode="Static" runat="server" />
                                            <i class="input-helper"></i>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>


                    </div>
                    <%--END Button 2--%>

                    <%--Button 3--%>
                    <div class="row">
                        <div class="col-sm-4">

                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Buton İşlem Adı</p>
                                <asp:TextBox ID="txtButonAdi3" class="form-control input-sm" runat="server" placeholder="Onayla" ValidationGroup="Buton"></asp:TextBox>

                            </div>

                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Sql Cümlesi</p>
                                <asp:TextBox ID="txtButonSqlCumlesi3" class="form-control input-sm" runat="server" placeholder="UPDATE STHAR SET Onay=1" ValidationGroup="Buton"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Sql Cümle Eşleşme Kolonu</p>
                                <asp:TextBox ID="txtSqlCumleEslesmeKolonu3" class="form-control input-sm" runat="server" placeholder="INCKEYNO" ValidationGroup="Buton"></asp:TextBox>

                            </div>
                        </div>
                        <div class="col-sm-2">
                            <div class="form-group fg-line">
                                <p class="f-500 m-b-5 f-700">Aktif</p>
                                <div class="col-sm-4">
                                    <div class="fg-line">
                                        <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                            <asp:CheckBox ID="chkButonAktif3" ClientIDMode="Static" runat="server" />
                                            <i class="input-helper"></i>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <%--END Button 3--%>
                    <div class="alert alert-warning alert-dismissible" role="alert" style="visibility: hidden;">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <asp:CustomValidator ID="CustomValidator2" ValidationGroup="Rapor" runat="server" CssClass="control-label" ErrorMessage="Lütfen boş geçilemeyecek alanları doldurunuz" OnServerValidate="Validator_ServerValidate"></asp:CustomValidator>
                    </div>
                </div>
            </div>
            <%--END Rapor İşlem Butonları Tanımlama--%>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="cmbVeriTabaniAdi" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="cmbRaporViewAdi" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="cmbAltRaporAdi1" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="cmbAltRaporAdi2" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="cmbAltRaporAdi3" EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>
    <div class="row">

        <div class="alert alert-warning alert-dismissible" role="alert" style="visibility: hidden;">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
            <asp:CustomValidator ID="Validator" ValidationGroup="Rapor" runat="server" CssClass="control-label" ErrorMessage="Lütfen boş geçilemeyecek alanları doldurunuz" OnServerValidate="Validator_ServerValidate"></asp:CustomValidator>
        </div>
        <div>
            <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 style="clear: both;"></div>
        </div>
    </div>
    <%--END İşlemler butonları--%>

    <script type="text/javascript">
        function DokumanGoruntule(Id) {
            var resimdata = $("#imgDokumanItem_" + Id).data("buyukdata");
            if (resimdata != null) {
                var viewer = ImageViewer();
                viewer.show(resimdata, resimdata);
            } else
                notify("Seçilen kaydın resim verisi bulunmadığından görüntülenemiyor", "info");
        }
    </script>
</asp:Content>
