<%@ Page Title="" Language="C#" MasterPageFile="~/BSoylu.master" AutoEventWireup="true" CodeFile="Yonetici.aspx.cs" Inherits="Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <table class="style1">
        <tr>
            <td valign="top"><font size="3">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" 
                    DataSourceID="AccessDataSource1" EnableModelValidation="True" 
                    CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ItemStyle-Font-Size="Medium"/>
                        <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ItemStyle-Font-Size="Medium"
                            ReadOnly="True" SortExpression="ID" />
                        <asp:BoundField DataField="Adi" HeaderText="Adi" SortExpression="Adi" ItemStyle-Font-Size="Medium" />
                        <asp:BoundField DataField="Soyadi" HeaderText="Soyadi" ItemStyle-Font-Size="Medium"
                            SortExpression="Soyadi" />
                        <asp:BoundField DataField="Mail" HeaderText="Mail" SortExpression="Mail" ItemStyle-Font-Size="Medium" />
                        <asp:BoundField DataField="Sifre" HeaderText="Sifre" SortExpression="Sifre" ItemStyle-Font-Size="Medium"/>
                    </Columns>
                    <EditRowStyle BackColor="#7C6F57" />
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#E3EAEB" />
                    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                </asp:GridView>
                </font>
                <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
                    ConflictDetection="CompareAllValues" DataFile="~/App_Data/BSoylu.mdb" 
                    DeleteCommand="DELETE FROM [Kullanicilar] WHERE [ID] = ? AND (([Adi] = ?) OR ([Adi] IS NULL AND ? IS NULL)) AND (([Soyadi] = ?) OR ([Soyadi] IS NULL AND ? IS NULL)) AND (([Mail] = ?) OR ([Mail] IS NULL AND ? IS NULL)) AND (([Sifre] = ?) OR ([Sifre] IS NULL AND ? IS NULL))" 
                    InsertCommand="INSERT INTO [Kullanicilar] ([ID], [Adi], [Soyadi], [Mail], [Sifre]) VALUES (?, ?, ?, ?, ?)" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectCommand="SELECT * FROM [Kullanicilar]" 
                    UpdateCommand="UPDATE [Kullanicilar] SET [Adi] = ?, [Soyadi] = ?, [Mail] = ?, [Sifre] = ? WHERE [ID] = ? AND (([Adi] = ?) OR ([Adi] IS NULL AND ? IS NULL)) AND (([Soyadi] = ?) OR ([Soyadi] IS NULL AND ? IS NULL)) AND (([Mail] = ?) OR ([Mail] IS NULL AND ? IS NULL)) AND (([Sifre] = ?) OR ([Sifre] IS NULL AND ? IS NULL))">
                    <DeleteParameters>
                        <asp:Parameter Name="original_ID" Type="Int32" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="ID" Type="Int32" />
                        <asp:Parameter Name="Adi" Type="String" />
                        <asp:Parameter Name="Soyadi" Type="String" />
                        <asp:Parameter Name="Mail" Type="String" />
                        <asp:Parameter Name="Sifre" Type="String" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Adi" Type="String" />
                        <asp:Parameter Name="Soyadi" Type="String" />
                        <asp:Parameter Name="Mail" Type="String" />
                        <asp:Parameter Name="Sifre" Type="String" />
                        <asp:Parameter Name="original_ID" Type="Int32" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                    </UpdateParameters>
                </asp:AccessDataSource>
            </td>
            <td>
                <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" 
                    DataSourceID="AccessDataSource2" DefaultMode="Insert" 
                    EnableModelValidation="True">
                    <EditItemTemplate>
                        ID:
                        <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
                        <br />
                        Adi:
                        <asp:TextBox ID="AdiTextBox" runat="server" Text='<%# Bind("Adi") %>' />
                        <br />
                        Soyadi:
                        <asp:TextBox ID="SoyadiTextBox" runat="server" Text='<%# Bind("Soyadi") %>' />
                        <br />
                        Mail:
                        <asp:TextBox ID="MailTextBox" runat="server" Text='<%# Bind("Mail") %>' />
                        <br />
                        Sifre:
                        <asp:TextBox ID="SifreTextBox" runat="server" Text='<%# Bind("Sifre") %>' />
                        <br />
                        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                            CommandName="Update" Text="Update" />
                        &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                            CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                    </EditItemTemplate>
                    <InsertItemTemplate>
                    <table border="0">
                        <tr>
                            <th>Adı:</th>
                            <td> <asp:TextBox ID="AdiTextBox" runat="server" Text='<%# Bind("Adi") %>' /></td>
                        </tr>
                        <tr>
                            <th>Soyadı:</th>
                            <td> <asp:TextBox ID="SoyadiTextBox" runat="server" Text='<%# Bind("Soyadi") %>' /></td>
                        </tr>
                        <tr>
                            <th>Mail:</th>
                            <td> <asp:TextBox ID="MailTextBox" runat="server" Text='<%# Bind("Mail") %>' /></td>
                        </tr>
                        <tr>
                            <th>Şifre:</th>
                            <td><asp:TextBox ID="SifreTextBox" runat="server" Text='<%# Bind("Sifre") %>' /></td>
                        </tr>
                        <tr>
                            <th colspan="2"><asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                            CommandName="Insert" Text="EKLE" /></th>
                            
                        </tr>
                    </table>
                        

                    </InsertItemTemplate>
                    <ItemTemplate>
                        ID:
                        <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
                        <br />
                        Adi:
                        <asp:Label ID="AdiLabel" runat="server" Text='<%# Bind("Adi") %>' />
                        <br />
                        Soyadi:
                        <asp:Label ID="SoyadiLabel" runat="server" Text='<%# Bind("Soyadi") %>' />
                        <br />
                        Mail:
                        <asp:Label ID="MailLabel" runat="server" Text='<%# Bind("Mail") %>' />
                        <br />
                        Sifre:
                        <asp:Label ID="SifreLabel" runat="server" Text='<%# Bind("Sifre") %>' />
                        <br />
                        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                            CommandName="Edit" Text="Edit" />
                        &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                            CommandName="Delete" Text="Delete" />
                        &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                            CommandName="New" Text="New" />
                    </ItemTemplate>
                </asp:FormView>
                <asp:AccessDataSource ID="AccessDataSource2" runat="server" 
                    ConflictDetection="CompareAllValues" DataFile="~/App_Data/BSoylu.mdb" 
                    DeleteCommand="DELETE FROM [Kullanicilar] WHERE [ID] = ? AND (([Adi] = ?) OR ([Adi] IS NULL AND ? IS NULL)) AND (([Soyadi] = ?) OR ([Soyadi] IS NULL AND ? IS NULL)) AND (([Mail] = ?) OR ([Mail] IS NULL AND ? IS NULL)) AND (([Sifre] = ?) OR ([Sifre] IS NULL AND ? IS NULL))" 
                    InsertCommand="INSERT INTO [Kullanicilar] ([Adi], [Soyadi], [Mail], [Sifre]) VALUES (?, ?, ?, ?)" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectCommand="SELECT * FROM [Kullanicilar]" 
                    UpdateCommand="UPDATE [Kullanicilar] SET [Adi] = ?, [Soyadi] = ?, [Mail] = ?, [Sifre] = ? WHERE [ID] = ? AND (([Adi] = ?) OR ([Adi] IS NULL AND ? IS NULL)) AND (([Soyadi] = ?) OR ([Soyadi] IS NULL AND ? IS NULL)) AND (([Mail] = ?) OR ([Mail] IS NULL AND ? IS NULL)) AND (([Sifre] = ?) OR ([Sifre] IS NULL AND ? IS NULL))">
                    <DeleteParameters>
                        <asp:Parameter Name="original_ID" Type="Int32" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="Adi" Type="String" />
                        <asp:Parameter Name="Soyadi" Type="String" />
                        <asp:Parameter Name="Mail" Type="String" />
                        <asp:Parameter Name="Sifre" Type="String" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Adi" Type="String" />
                        <asp:Parameter Name="Soyadi" Type="String" />
                        <asp:Parameter Name="Mail" Type="String" />
                        <asp:Parameter Name="Sifre" Type="String" />
                        <asp:Parameter Name="original_ID" Type="Int32" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Adi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Soyadi" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Mail" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                        <asp:Parameter Name="original_Sifre" Type="String" />
                    </UpdateParameters>
                </asp:AccessDataSource>
                &nbsp;</td>
        </tr>
    </table>

</asp:Content>

