<%@ Page Language="C#" AutoEventWireup="True" MasterPageFile="~/Site.Master" CodeBehind="Kategorien.aspx.cs" Inherits="QW2021C.Administration.Kategorien" %>

<%@ 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>Kategorien</h4></asp:Label>
           <ej:Grid ID="Grid1" runat="server" CssClass="" DataSourceCachingMode="None" DataSourceID="SqlDataSource1" EnableLoadOnDemand="False" Locale="de-DE" MinWidth="0" OnServerBatchEditRow="OnServer_Batcheditrow" Width="260px"  >
           <EditSettings AllowEditing="true" EditMode="Batch" />
           <Columns>
               <ej:Column DataType="string" Field="Kategorie" IsPrimaryKey="True" AllowEditing="False" Width="100px">
               </ej:Column>
               <ej:Column DataType="boolean" Field="Aktiv" EditType="BooleanEdit">
               </ej:Column>
                <ej:Column DataType="boolean" Field="KidCup" EditType="BooleanEdit" Width="100px" HeaderText="KidsCup">
               </ej:Column>
           </Columns>
           <ToolbarSettings ShowToolbar="true" ToolbarItems="update" />

       </ej:Grid>
   <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:QWToolConnectionstring %>" 
      SelectCommand="SELECT * FROM [kat]" 
       DeleteCommand="DELETE FROM [kat] WHERE [Kategorie] = @Kategorie" 
       InsertCommand="INSERT INTO [kat] ([Kategorie], [Aktiv], [KidCup]) VALUES (@Kategorie, @Aktiv,@KidCup)" 
       UpdateCommand="UPDATE [kat] SET [kategorie] = @kategorie, [Aktiv] = @Aktiv, KidCup=@KidCup  where kategorie=@kategorie">
      <DeleteParameters>
         <asp:Parameter Name="Kategorie" Type="String" />
      </DeleteParameters>
      <InsertParameters>
         <asp:Parameter Name="Kategorie" Type="String" />
         <asp:Parameter Name="Aktiv" Type="Boolean" />
         <asp:Parameter Name="KidCup" Type="Boolean" />

      </InsertParameters>
      <UpdateParameters>
         <asp:Parameter Name="nreintrag" Type="Int32" />
         <asp:Parameter Name="Aktiv" Type="Boolean" />
         <asp:Parameter Name="KidCup" Type="Boolean" />
          <asp:Parameter Name="Kategorie" Type="String" />
      </UpdateParameters>
   </asp:SqlDataSource>
       
</asp:Content>