protected void Btnreponse_Click(object sender, EventArgs e)
        {
            AstreeDonnees a = new AstreeDonnees();

            if (txtproduit.Text != "")
            {
                List <serviceDB> lstService = a.GetServices();
                serviceDB        ser        = new serviceDB();
                ser = lstService.Where(w => w.code_service == Convert.ToInt16(txtId.Text)).FirstOrDefault();
                if (ser != null)
                {
                    if (Txtetat.Text != "VALIDEE")
                    {
                        lblMsgSucces.Visible = false;
                        MsgProduit.Visible   = false;
                        MsgEtat.Visible      = true;
                        MsgEtat.Text         = "Vous devez valider le devis selectionné!";
                    }
                    else
                    {
                        if (String.IsNullOrEmpty(txtreponse.Text))
                        {
                            lblMsgSucces.Visible = false;
                            MsgEtat.Visible      = false;
                            Msgreponse.Visible   = true;
                            Msgreponse.Text      = "veuillez remplir la réponse ";
                        }
                        else
                        {
                            ser.etat = "V";

                            ser.dateReponse = DateTime.Now;



                            ser.reponse = txtreponse.Text;
                            a.maj_derogation(ser);
                            BindGrid();
                            MsgEtat.Visible      = false;
                            Msgreponse.Visible   = false;
                            lblMsgSucces.Visible = true;
                            lblMsgSucces.Text    = "Reponse envoyée avec succès ";

                            if (ser.etatNotif == "")
                            {
                                notificationDB notif = new notificationDB();
                                notif.codeService         = ser.code_service;
                                notif.contenuNotification = ser.reponse;
                                notif.etatNotif           = "N";// NON LU
                                notif.dateNotification    = ser.dateReponse;
                                a.InsertNotification(notif);
                                Label b = (Label)Master.FindControl("nbNotification") as Label;

                                Label x = (Label)Master.FindControl("lblNotifRemise") as Label;

                                List <serviceDB> lsNotification = a.GetServices().Where(w => (w.libelleService != null) && (w.etat.Trim() == "A")).ToList();

                                x.Text = lsNotification.Where(w => w.libelleService.Trim() == "Derogation" && w.idType == 1).Count().ToString();
                                //b.Text = x.Text;
                                Label y = (Label)Master.FindControl("lblNotifProrogation") as Label;

                                y.Text = lsNotification.Where(w => w.libelleService.Trim() == "Derogation" && w.idType == 2).Count().ToString();
                                //b.Text = y.Text;
                                Label z = (Label)Master.FindControl("lblNotifSouscription") as Label;
                                z.Text = lsNotification.Where(w => w.libelleService.Trim() == "Derogation" && w.idType == 3).Count().ToString();

                                //b.Text = z.Text;

                                b.Text = (Convert.ToInt16(b.Text.ToString()) - 1).ToString();
                            }
                        }
                    }
                }
                else
                {
                    MsgEtat.Visible    = false;
                    MsgProduit.Visible = true;
                    MsgProduit.Text    = "Vous devez selectionner un devis!";
                }
            }
        }