1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| <asp:SqlDataSource ID="ajout" runat="server"
ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>"
InsertCommand="StoredProcedure1" InsertCommandType="StoredProcedure"
SelectCommand="SELECT réponse_id, réponse_texte, sujet_id, utilisateur_id, heure FROM Réponse">
<InsertParameters>
<asp:Parameter Name="réponse_texte" Type="String" />
<asp:Parameter Name="sujet_id" Type="Int32" />
<asp:Parameter Name="heure" Type="DateTime" />
<asp:Parameter Name="utilisateur_id" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:FormView class="zoneajout" autopostback = "true" ID="FormView1" runat="server"
DataKeyNames="réponse_id" DataSourceID="ajout" DefaultMode="Insert">
<EditItemTemplate>
réponse_id:
<asp:Label ID="réponse_idLabel1" runat="server"
Text='<%# Eval("réponse_id") %>' />
<br />
réponse_texte:
<asp:TextBox ID="réponse_texteTextBox" runat="server"
Text='<%# Bind("réponse_texte") %>' />
<br />
sujet_id:
<asp:TextBox ID="sujet_idTextBox" runat="server"
Text='<%# Bind("sujet_id") %>' />
<br />
utilisateur_id:
<asp:TextBox ID="utilisateur_idTextBox" runat="server"
Text='<%# Bind("utilisateur_id") %>' />
<br />
heure:
<asp:TextBox ID="heureTextBox" runat="server" Text='<%# Bind("heure") %>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Mettre à jour" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Annuler" />
</EditItemTemplate>
<InsertItemTemplate>
Taper votre réponse:
<asp:TextBox ID="réponse_texteTextBox" runat="server"
Text='<%# Bind("réponse_texte") %>' />
<br />
<asp:TextBox ID="sujet_idTextBox" runat="server"
Text='<%# Bind("sujet_id") %>' />
<br />
utilisateur_id:
<asp:TextBox ID="utilisateur_idTextBox" runat="server"
Text='<%# Bind("utilisateur_id") %>' />
<br />
<asp:TextBox ID="heureTextBox" runat="server" Text='<%# Bind("heure") %>' />
<br />
<asp:Button ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insérer" />
<asp:Button ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Annuler" />
</InsertItemTemplate>
<ItemTemplate>
réponse_id:
<asp:Label ID="réponse_idLabel" runat="server"
Text='<%# Eval("réponse_id") %>' />
<br />
réponse_texte:
<asp:Label ID="réponse_texteLabel" runat="server"
Text='<%# Bind("réponse_texte") %>' />
<br />
sujet_id:
<asp:Label ID="sujet_idLabel" runat="server" Text='<%# Bind("sujet_id") %>' />
<br />
utilisateur_id:
<asp:Label ID="utilisateur_idLabel" runat="server"
Text='<%# Bind("utilisateur_id") %>' />
<br />
heure:
<asp:Label ID="heureLabel" runat="server" Text='<%# Bind("heure") %>' />
<br />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="Nouveau" />
</ItemTemplate>
</asp:FormView> |
Partager