<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Resultat_Orte.aspx.cs" Inherits="QW2021C.Resultate.Resultat_Orte" %>

<%@ Register Assembly="Syncfusion.EJ.Web, Version=18.3460.0.35, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Web" TagPrefix="ej" %>
<%@ Register Assembly="Syncfusion.EJ, Version=18.3460.0.35, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.JavaScript.Models" TagPrefix="ej" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:Label runat="server"><h4>Resultat_Orte</h4></asp:Label>
    <ej:Grid ID="GridResultatOrte" Width="300px" runat="server" CssClass="" DataSourceCachingMode="None" DataSourceID="SqlDataSource1" EnableLoadOnDemand="False" Locale="de-DE" MinWidth="0" EnableToolbarItems="True">
        <Columns>
            <ej:Column AllowEditing="False" DataType="number" Field="OrtNr" IsIdentity="True" IsPrimaryKey="True">
            </ej:Column>
            <ej:Column DataType="string" Field="Ort">
            </ej:Column>
            <ej:Column DataType="number" Field="sort">
            </ej:Column>
        </Columns>
        <EditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" ShowAddNewRow="True" />
         <ToolbarSettings ShowToolbar="true" ToolbarItems="insert,update,delete" />
    </ej:Grid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:QWToolConnectionstring %>" DeleteCommand="DELETE FROM [Res_Ort] WHERE [OrtNr] = @OrtNr" InsertCommand="INSERT INTO [Res_Ort] ([Ort], [sort]) VALUES (@Ort, @sort)" SelectCommand="SELECT * FROM [Res_Ort] ORDER BY [sort], [Ort]" UpdateCommand="UPDATE [Res_Ort] SET [Ort] = @Ort, [sort] = @sort WHERE [OrtNr] = @OrtNr">
        <DeleteParameters>
            <asp:Parameter Name="OrtNr" Type="Int32"  />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Ort" Type="String" />
            <asp:Parameter Name="sort" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Ort" Type="String" />
            <asp:Parameter Name="sort" Type="Int32" />
            <asp:Parameter Name="OrtNr" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>