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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
| <%@ Page Title="Page d'accueil" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default"%>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Bienvenue dans ASP.NET!
</h2>
<p>
<asp:DropDownList ID="SelectCategorie" runat="server" AutoPostBack="True"
DataSourceID="SqlCategorie" DataTextField="categorie"
DataValueField="categorie">
</asp:DropDownList>
<asp:DropDownList ID="SelectType" runat="server" AutoPostBack="True"
DataSourceID="SqlType" DataTextField="type" DataValueField="type">
</asp:DropDownList>
<asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="~/images/oeil.gif"></asp:HyperLink>
<asp:ImageButton ID="modif" runat="server" Height="21px"
ImageUrl="~/images/ModifEnregistrement.jpg" Width="26px" />
<asp:TextBox ID="TextBox1" runat="server" Width="502px"></asp:TextBox>
</p>
<p>
<asp:GridView ID="GridViewSelect" runat="server" AllowPaging="True"
AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlResultat">
<Columns>
<asp:CommandField ShowSelectButton="True" ButtonType="Image"
SelectImageUrl="~/images/checkbox_vide.gif" />
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False"
ReadOnly="True" SortExpression="id" />
<asp:BoundField DataField="reference" HeaderText="reference"
SortExpression="reference" />
<asp:BoundField DataField="designation" HeaderText="designation"
SortExpression="designation" />
<asp:BoundField DataField="categorie" HeaderText="categorie"
SortExpression="categorie" />
<asp:BoundField DataField="type" HeaderText="type" SortExpression="type" />
<asp:BoundField DataField="service" HeaderText="service"
SortExpression="service" />
<asp:BoundField DataField="remarques" HeaderText="remarques"
SortExpression="remarques" />
<asp:BoundField DataField="annee" HeaderText="annee" SortExpression="annee" />
<asp:BoundField DataField="indice" HeaderText="indice"
SortExpression="indice" />
<asp:BoundField DataField="datecreation" HeaderText="datecreation"
SortExpression="datecreation" />
<asp:BoundField DataField="dateaplication" HeaderText="dateaplication"
SortExpression="dateaplication" />
<asp:BoundField DataField="affichage" HeaderText="affichage"
SortExpression="affichage" />
<asp:BoundField DataField="lien" HeaderText="lien" SortExpression="lien" />
<asp:CommandField ButtonType="Image" DeleteImageUrl="~/images/supprimer.jpg"
DeleteText="" ShowDeleteButton="True" />
</Columns>
</asp:GridView>
</p>
<p>
<asp:SqlDataSource ID="SqlResultat" runat="server"
ConnectionString="<%$ ConnectionStrings:GEDConnection %>"
DeleteCommand="DELETE FROM [GED] WHERE [id] = @id"
InsertCommand="INSERT INTO [GED] ([reference], [designation], [categorie], [type], [service], [remarques], [annee], [indice], [datecreation], [dateaplication], [affichage], [lien]) VALUES (@reference, @designation, @categorie, @type, @service, @remarques, @annee, @indice, @datecreation, @dateaplication, @affichage, @lien)"
SelectCommand="SELECT * FROM [GED] WHERE (([categorie] = @categorie) AND ([type] = @type))"
UpdateCommand="UPDATE [GED] SET [reference] = @reference, [designation] = @designation, [categorie] = @categorie, [type] = @type, [service] = @service, [remarques] = @remarques, [annee] = @annee, [indice] = @indice, [datecreation] = @datecreation, [dateaplication] = @dateaplication, [affichage] = @affichage, [lien] = @lien WHERE [id] = @id">
<DeleteParameters>
<asp:Parameter Name="id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="reference" Type="String" />
<asp:Parameter Name="designation" Type="String" />
<asp:Parameter Name="categorie" Type="String" />
<asp:Parameter Name="type" Type="String" />
<asp:Parameter Name="service" Type="String" />
<asp:Parameter Name="remarques" Type="String" />
<asp:Parameter Name="annee" Type="String" />
<asp:Parameter Name="indice" Type="String" />
<asp:Parameter Name="datecreation" Type="String" />
<asp:Parameter Name="dateaplication" Type="String" />
<asp:Parameter Name="affichage" Type="String" />
<asp:Parameter Name="lien" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:ControlParameter ControlID="SelectCategorie" Name="categorie"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="SelectType" Name="type"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="reference" Type="String" />
<asp:Parameter Name="designation" Type="String" />
<asp:Parameter Name="categorie" Type="String" />
<asp:Parameter Name="type" Type="String" />
<asp:Parameter Name="service" Type="String" />
<asp:Parameter Name="remarques" Type="String" />
<asp:Parameter Name="annee" Type="String" />
<asp:Parameter Name="indice" Type="String" />
<asp:Parameter Name="datecreation" Type="String" />
<asp:Parameter Name="dateaplication" Type="String" />
<asp:Parameter Name="affichage" Type="String" />
<asp:Parameter Name="lien" Type="String" />
<asp:Parameter Name="id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlCategorie" runat="server"
ConnectionString="<%$ ConnectionStrings:BowdenGEDConnection %>"
SelectCommand="SELECT DISTINCT [categorie] FROM [GED]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlType" runat="server"
ConnectionString="<%$ ConnectionStrings:BowdenGEDConnection %>"
SelectCommand="SELECT DISTINCT [type] FROM [GED] WHERE ([categorie] = @categorie)">
<SelectParameters>
<asp:ControlParameter ControlID="SelectCategorie" Name="categorie"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</p>
<p>
Vous pouvez également trouver de la <a href="http://go.microsoft.com/fwlink/?LinkID=152368"
title="Documentation ASP.NET sur MSDN">documentation sur ASP.NET sur MSDN</a>.
</p>
</asp:Content> |
Partager