je me rattrape la requete dans le génerateur de requete est la suivante:
SELECT assure.nom_par, assure.pre_par, salaire.mbr_mms FROM assure INNER JOIN salaire ON assure.cod_sec = salaire.cod_sec AND assure.num_adh = salaire.num_adh AND assure.num_parp = salaire.num_par WHERE (assure.cod_sec = ?) AND (assure.num_adh = ?) AND (salaire.cod_prd = ?)
pour le code aspx:
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
| <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="majdessalairesm.aspx.cs" Inherits="_Default" Title="mise a jour des salaires" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
<asp:Label ID="Label1" runat="server" Text="MISE A JOUR DES SALAIRES"
style="font-weight: 700; font-size: medium"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server" Text="Adherent" style="font-size: small"></asp:Label>
:
<asp:TextBox ID="TextBox1" runat="server" Width="40px"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server" Width="52px"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label4" runat="server" Text="Periode" style="font-size: small"></asp:Label>
:<asp:TextBox ID="TextBox3" runat="server" Width="110px"></asp:TextBox>
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC"
BorderStyle="None" BorderWidth="1px" CellPadding="3"
DataSourceID="SqlDataSource1"
EmptyDataText="Il n'y a aucun enregistrement de données à afficher.">
<RowStyle ForeColor="#000066" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="pre_par" HeaderText="prenom"
SortExpression="pre_par" />
<asp:BoundField DataField="nom_par" HeaderText="nom" SortExpression="nom_par" />
<asp:BoundField DataField="nbr_jr" HeaderText="nbr_jr"
SortExpression="nbr_jr" />
</Columns>
<FooterStyle BackColor="White" ForeColor="#000066" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>"
ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>"
SelectCommand="SELECT assure.nom_par, assure.pre_par, salaire.mbr_mms FROM assure INNER JOIN salaire ON assure.cod_sec = salaire.cod_sec AND assure.num_adh = salaire.num_adh AND assure.num_parp = salaire.num_par WHERE (assure.cod_sec = ?) AND (assure.num_adh = ?) AND (salaire.cod_prd = ?)">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="?" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox2" Name="?" PropertyName="Text" />
<asp:ControlParameter ControlID="TextBox3" Name="?" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
<br />
</asp:Content> |
Partager