#1 Koky
trocha kódu:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:TJTUPESYConnectionString %>"
DeleteCommand="DELETE FROM [Hraci] WHERE [Jmeno] = @original_Jmeno AND [Prijimeni] = @original_Prijimeni AND [IDKategorie] = @original_IDKategorie AND (([Narozeni] = @original_Narozeni) OR ([Narozeni] IS NULL AND @original_Narozeni IS NULL)) AND (([Cislo dresu] = @original_Cislo_dresu) OR ([Cislo dresu] IS NULL AND @original_Cislo_dresu IS NULL)) AND [ID_Hrace] = @original_ID_Hrace"
InsertCommand="INSERT INTO [Hraci] ([Jmeno], [Prijimeni], [IDKategorie], [Narozeni], [Cislo dresu], [ID_Hrace]) VALUES (@Jmeno, @Prijimeni, @IDKategorie, @Narozeni, @Cislo_dresu, @ID_Hrace)"
OldValuesParameterFormatString="original_{0}"
SelectCommand="SELECT * FROM [Hraci] WHERE ([IDKategorie] = @IDKategorie2)"
UpdateCommand="UPDATE [Hraci] SET [Prijimeni] = @Prijimeni, [IDKategorie] = @IDKategorie, [Narozeni] = @Narozeni, [Cislo dresu] = @Cislo_dresu, [ID_Hrace] = @ID_Hrace WHERE [Jmeno] = @original_Jmeno AND [Prijimeni] = @original_Prijimeni AND [IDKategorie] = @original_IDKategorie AND (([Narozeni] = @original_Narozeni) OR ([Narozeni] IS NULL AND @original_Narozeni IS NULL)) AND (([Cislo dresu] = @original_Cislo_dresu) OR ([Cislo dresu] IS NULL AND @original_Cislo_dresu IS NULL)) AND [ID_Hrace] = @original_ID_Hrace">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="IDKategorie2"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="original_Jmeno" Type="String" />
<asp:Parameter Name="original_Prijimeni" Type="String" />
<asp:Parameter Name="original_IDKategorie" Type="Int32" />
<asp:Parameter DbType="Date" Name="original_Narozeni" />
<asp:Parameter Name="original_Cislo_dresu" Type="Int32" />
<asp:Parameter Name="original_ID_Hrace" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Prijimeni" Type="String" />
<asp:Parameter Name="IDKategorie" Type="Int32" />
<asp:Parameter DbType="Date" Name="Narozeni" />
<asp:Parameter Name="Cislo_dresu" Type="Int32" />
<asp:Parameter Name="ID_Hrace" Type="Int32" />
<asp:Parameter Name="original_Jmeno" Type="String" />
<asp:Parameter Name="original_Prijimeni" Type="String" />
<asp:Parameter Name="original_IDKategorie" Type="Int32" />
<asp:Parameter DbType="Date" Name="original_Narozeni" />
<asp:Parameter Name="original_Cislo_dresu" Type="Int32" />
<asp:Parameter Name="original_ID_Hrace" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Jmeno" Type="String" />
<asp:Parameter Name="Prijimeni" Type="String" />
<asp:Parameter Name="IDKategorie" Type="Int32" />
<asp:Parameter DbType="Date" Name="Narozeni" />
<asp:Parameter Name="Cislo_dresu" Type="Int32" />
<asp:Parameter Name="ID_Hrace" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>