| 12
 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
 
 | protected void Page_Load(object sender, EventArgs e) //page popup
        {
            if (Session.IsNewSession || Session["UserID"] == null)
                Response.Redirect("Default.aspx");
            else
            {
                if (lbltxtNumInter.Text!="") 
                    linter.GetIntervention(lbltxtNumInter.Text);
 
                nbCol = this.GridVListPiece.Columns.Count;
                sUserID = Session["UserID"].ToString();
                if (this.IsPostBack == false)
                {
                    lbltxtNumInter.Text = Request.QueryString["ControlVal"].ToString();
                    if (linter.InterventionExist(lbltxtNumInter.Text))
                    {
                        linter.GetIntervention(lbltxtNumInter.Text);
                        ledetail.DisplayDetailIntervention(GridVListPiece, lbltxtNumInter.Text);
                        setAuthorisedbouton();
                        txtcoutpiece.Text = linter.COUT_DES_PIECES.ToString();
                    }
                    else lblNote.Text = "Problème survenu, prière réessayer svp";
 
                    donref.BindParamList(DropDownListGrpPiece, "GROUPEPIECE");
                    if (DropDownListGrpPiece.SelectedValue.ToString() != "")
                        donref.BindParamList(DropDownListPiece, Convert.ToInt16(DropDownListGrpPiece.SelectedValue));
                }
            }
 
//par exemple cette action sur une liste déroulante
 
        protected void DropDownListGrpPiece_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(DropDownListGrpPiece.SelectedItem.Value))
            {
                ledetail.BindListePieceByGroup(DropDownListPiece, Convert.ToInt16(DropDownListGrpPiece.SelectedItem.Value));
            }
        }
 
<asp:DropDownList ID="DropDownListGrpPiece" runat="server" Height="35px" 
                                    Width="250px" 
                                    onselectedindexchanged="DropDownListGrpPiece_SelectedIndexChanged" 
                                    AutoPostBack="True">
                                </asp:DropDownList> |