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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-select/dist/js/bootstrap-select.js") %>"></script>
    <link href="<%=Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-select/dist/css/bootstrap-select.css") %>" rel="stylesheet" />
    <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/mobile/bootstrap-table-mobile.js")%>"></script>
    <script type="text/javascript">
        window.onload = function () {
            if (document.getElementById('cmbKullaniciTuru').value == '2') {
                document.getElementById("txtCariKodu").disabled = false;
            }
            else {
                document.getElementById("txtCariKodu").disabled = true;
            }

        }
        function KullaniciTuru() {

            if (document.getElementById('cmbKullaniciTuru').value == '2') {
                document.getElementById("txtCariKodu").disabled = false;
            }
            else {
                document.getElementById("txtCariKodu").disabled = true;
            }
        }
    </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/Kullanici/KullaniciListesi.aspx") %>">Kullanıcı Listesi</a></li>
        <li class="active">Kullanıcı Tanımlama</li>
    </ol>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div class="card">
        <div class="card-header">
            <h2>Kullanıcı Tanımlama</h2>
        </div>
        <div class="card-body card-padding">
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Adı Soyadı</p>
                        <asp:TextBox ID="txtTamAdi" class="form-control input-sm" runat="server" placeholder="Adı Soyadı" ValidationGroup="Kullanici"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Kullanıcı Adı</p>
                        <asp:TextBox ID="txtKullaniciAdi" class="form-control input-sm" runat="server" placeholder="Kullanıcı Adı" ValidationGroup="Kullanici"></asp:TextBox>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-3">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Kullanıcı Türü</p>
                        <asp:DropDownList ID="cmbKullaniciTuru" ClientIDMode="Static" class="selectpicker" onChange="KullaniciTuru();" runat="server" Style="width: 100%;">
                            <asp:ListItem Enabled="true" Text="Admin" Value="1"></asp:ListItem>
                            <asp:ListItem Enabled="true" Text="Standart Kullanıcı" Value="2"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Cari Kodu</p>
                        <asp:TextBox ID="txtCariKodu" class="form-control input-sm" runat="server" ClientIDMode="Static" placeholder="Cari Kodu" ValidationGroup="Kullanici"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Kullanıcı Grup</p>
                        <asp:DropDownList ID="cmbKullaniciGrup" ClientIDMode="Static" class="selectpicker" 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">Şifre</p>
                        <asp:TextBox ID="txtSifre" class="form-control input-sm" TextMode="Password" runat="server" placeholder="Şifre" ValidationGroup="Kullanici"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Email</p>
                        <asp:TextBox ID="txtEmail" TextMode="Email" class="form-control input-sm" runat="server" placeholder="Email" ValidationGroup="Kullanici"></asp:TextBox>
                    </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">Açılış Sayfası <small style="font-weight: 100;"> Ör: ~/Moduller/Rapor/VideoGoruntule.aspx</small></p> 
                        <asp:TextBox ID="txtVarsayilanSayfasi" class="form-control input-sm" runat="server" placeholder="Varsayılan Sayfa" ValidationGroup="Kullanici"></asp:TextBox>
                    </div>
                </div>

                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Raporların çalışacağı şirket</p>
                        <asp:DropDownList ID="cmbVeriTabaniAdi" data-live-search="true" ClientIDMode="Static" class="selectpicker" runat="server" Style="width: 100%;">
                        </asp:DropDownList>
                    </div>
                </div>
            </div>
            <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="Kullanici" 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>
    </div>
</asp:Content>
