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
|
<asp:DetailsView ID="DetailsView1" runat="server" Height="28px" Width="150px"
AutoGenerateRows="False" DataKeyNames="IdLocalisation"
DataSourceID="SqlDataSourceLocalisation">
<Fields>
<asp:TemplateField
HeaderText="Localisation"
SortExpression="Localisation">
<InsertItemTemplate>
<asp:TextBox
ID="IdLocalisationTextBox"
runat="server"
Text='<%# Bind("idLocalisation") %>'
Visible="false" />
<asp:DropDownList
ID="DropDownListLocalisation"
runat="server"
AppendDataBoundItems="true"
AutoPostBack="true"
DataSourceID="SqlDataSourceLocalisation"
DataTextField="NomLocalisation"
DataValueField="idLocalisation"
OnSelectedIndexChanged="DropDownListLocalisation_SelectedIndexChanged"
Width="98%">
<asp:ListItem>
</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="DropDownListLocalisation"
Display="Dynamic"
ErrorMessage="Champ obligatoire" />
</InsertItemTemplate>
<HeaderStyle
Width="180px" />
<ItemTemplate>
<asp:Label
ID="Label4"
runat="server"
Text='<%# Bind("NomLocalisation") %>' />
<asp:Label
ID="LabelIdLocalisation"
runat="server"
Text='<%# Bind("idLocalisation") %>'
Visible="false" />
</ItemTemplate>
</asp:TemplateField>
</Fields>
</asp:DetailsView>
<asp:CheckBoxList ID="CheckBoxList1" runat="server"
DataSourceID="SqlDataSourceChekBox" DataTextField="NomSecteur"
DataValueField="IdSecteur">
</asp:CheckBoxList>
<asp:SqlDataSource ID="SqlDataSourceLocalisation" runat="server"
ConnectionString="<%$ ConnectionStrings:PDP %>"
SelectCommand="SELECT [IdLocalisation], [NomLocalisation] FROM [Localisation] ORDER BY [NomLocalisation]">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSourceChekBox" runat="server"
ConnectionString="<%$ ConnectionStrings:PDP %>"
SelectCommand="select Secteur.IdSecteur,Secteur.NomSecteur From Secteur INNER JOIN InterPDP on InterPDP.IdSecteur = Secteur.IdSecteur where IdLocalisation = @IdLocalisation"
</asp:SqlDataSource> |
Partager