begin process at 2010 02 10 07:31:29
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive C#

 > 

Archives

 > 

Divers

 > 

probleme d'inversement de 2 champs saisies???


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

probleme d'inversement de 2 champs saisies???

lundi 4 avril 2005 à 12:14:15 | probleme d'inversement de 2 champs saisies???

firas_tn

Salut a tous
j'ai besoin de votre aide au sujet d'une page en aspx cs cette page retourne un formulaire a remplir ou il ya quelques problemes il ya un inversement des champs fréquences sur un site 1 et fréquence sur un site 2 ces deux champs sont inversés et ça cause des problemes dans l'operateur telecom ou je travaille bon voila le code aidez moi en m'indiquant ou je dois faire des modifications pour annuler ces inversement et Merci:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Data.OleDb;

namespace transmission
{
 /// <summary>
 /// Description résumée de D7T_Form.
 /// </summary>
 public class D7T_Form : System.Web.UI.Page
 {
  protected System.Web.UI.WebControls.Label Label1;
  protected System.Web.UI.WebControls.Label Label2;
  protected System.Web.UI.WebControls.Label Label3;
  protected System.Web.UI.WebControls.Label Label4;
  protected System.Web.UI.WebControls.ImageButton ImageButton1;
  protected System.Web.UI.WebControls.Label Label5;
  protected System.Web.UI.WebControls.Label Label6;
  protected System.Web.UI.WebControls.TextBox txt_site1;
  protected System.Web.UI.WebControls.TextBox txt_site2;
  protected System.Web.UI.WebControls.TextBox txt_Date;
  protected System.Web.UI.WebControls.Label Label7;
  protected System.Web.UI.WebControls.Label Label8;
  protected System.Web.UI.WebControls.TextBox txt_frequence;
  protected System.Web.UI.WebControls.Label Label9;
  protected System.Web.UI.WebControls.TextBox txt_configuration;
  protected System.Web.UI.WebControls.Label Label10;
  protected System.Web.UI.WebControls.TextBox txt_capacite_equipement;
  protected System.Web.UI.WebControls.Label Label11;
  protected System.Web.UI.WebControls.TextBox txt_capacite_requise;
  protected System.Web.UI.WebControls.Label Label12;
  protected System.Web.UI.WebControls.TextBox txt_equipementier;
  protected System.Web.UI.WebControls.Label Label13;
  protected System.Web.UI.WebControls.TextBox txt_version;
  protected System.Web.UI.WebControls.Label Label14;
  protected System.Web.UI.WebControls.TextBox txt_modele_equipement;
  protected System.Web.UI.WebControls.Label Label15;
  protected System.Web.UI.WebControls.Label Label16;
  protected System.Web.UI.WebControls.Label Label17;
  protected System.Web.UI.WebControls.Label Label18;
  protected System.Web.UI.WebControls.TextBox txt_polarisation;
  protected System.Web.UI.WebControls.TextBox txt_canal;
  protected System.Web.UI.WebControls.TextBox txt_puissance_emise_theorique;
  protected System.Web.UI.WebControls.TextBox txt_puissance_recue_theorique;
  protected System.Web.UI.WebControls.Label Label19;
  protected System.Web.UI.WebControls.Label Label20;
  protected System.Web.UI.WebControls.Label Label21;
  protected System.Web.UI.WebControls.Label Label22;
  protected System.Web.UI.WebControls.TextBox txt_freq_em1_site1;
  protected System.Web.UI.WebControls.TextBox txt_freq_em2_site1;
  protected System.Web.UI.WebControls.TextBox txt_puiss_em_site1;
  protected System.Web.UI.WebControls.TextBox txt_puiss_rec_site1;
  protected System.Web.UI.WebControls.TextBox txt_freq_em1_site2;
  protected System.Web.UI.WebControls.TextBox txt_freq_em2_site2;
  protected System.Web.UI.WebControls.TextBox txt_puiss_em_site2;
  protected System.Web.UI.WebControls.TextBox txt_puiss_rec_site2;
  protected System.Web.UI.WebControls.Label Label23;
  protected System.Web.UI.WebControls.Label Label24;
  protected System.Web.UI.WebControls.Label Label25;
  protected System.Web.UI.WebControls.Label Label26;
  protected System.Web.UI.WebControls.Label Label27;
  protected System.Web.UI.WebControls.TextBox txt_numserie_antenne_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_antenne_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_antenne_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_antenne_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_tribint_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_tribint_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_tribint_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_controller_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_controller_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_controller_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_controller_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_rtm_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_rtm_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_rtm_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_rtm_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_odu_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_odu_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_odu_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_odu_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_idu_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_idu_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_numserie_idu_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_tribint_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_numserie_idu_principal_site1;
  protected System.Web.UI.WebControls.Label Label28;
  protected System.Web.UI.WebControls.Label Label29;
  protected System.Web.UI.WebControls.Label Label30;
  protected System.Web.UI.WebControls.Label Label31;
  protected System.Web.UI.WebControls.Label Label32;
  protected System.Web.UI.WebControls.Label Label33;
  protected System.Web.UI.WebControls.Label Label34;
  protected System.Web.UI.WebControls.Label Label35;
  protected System.Web.UI.WebControls.Label Label36;
  protected System.Web.UI.WebControls.Label Label37;
  protected System.Web.UI.WebControls.Label Label38;
  protected System.Web.UI.WebControls.TextBox txt_taille_ant_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_nbre_ant_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_hauteur_ant_principal_site1;
  protected System.Web.UI.WebControls.TextBox txt_taille_ant_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_nbre_ant_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_hauteur_ant_extension_site1;
  protected System.Web.UI.WebControls.TextBox txt_taille_ant_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_taille_ant_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_nbre_ant_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_nbre_ant_extension_site2;
  protected System.Web.UI.WebControls.TextBox txt_hauteur_ant_principal_site2;
  protected System.Web.UI.WebControls.TextBox txt_hauteur_ant_extension_site2;
  protected System.Web.UI.WebControls.RadioButtonList brakon_site1;
  protected System.Web.UI.WebControls.RadioButtonList brakon_site2;
  protected System.Web.UI.WebControls.Label Label39;
  protected System.Web.UI.WebControls.Label Label40;
  protected System.Web.UI.WebControls.Label Label41;
  protected System.Web.UI.WebControls.Label Label42;
  protected System.Web.UI.WebControls.Label Label43;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_rack_site1;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_rack_site2;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_idu_site1;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_idu_site2;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_odu_site1;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_odu_site2;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_cableIF_site1;
  protected System.Web.UI.WebControls.RadioButtonList mise_a_terre_cableIF_site2;
  protected System.Web.UI.WebControls.Label Label44;
  protected System.Web.UI.WebControls.Label Label45;
  protected System.Web.UI.WebControls.Label Label46;
  protected System.Web.UI.WebControls.TextBox txt_energie_mesuree;
  protected System.Web.UI.WebControls.Label Label47;
  protected System.Web.UI.WebControls.RadioButtonList resultat_energie;
  protected System.Web.UI.WebControls.Label Label48;
  protected System.Web.UI.WebControls.Label Label49;
  protected System.Web.UI.WebControls.Label Label50;
  protected System.Web.UI.WebControls.Label Label51;
  protected System.Web.UI.WebControls.RadioButtonList etancheite_odu_site1;
  protected System.Web.UI.WebControls.RadioButtonList etancheite_odu_site2;
  protected System.Web.UI.WebControls.RadioButtonList etancheite_tremie_site1;
  protected System.Web.UI.WebControls.RadioButtonList etancheite_tremie_site2;
  protected System.Web.UI.WebControls.RadioButtonList etancheite_proprete_site1;
  protected System.Web.UI.WebControls.RadioButtonList etancheite_proprete_site2;
  protected System.Web.UI.WebControls.Label Label52;
  protected System.Web.UI.WebControls.RadioButtonList supervision;
  protected System.Web.UI.WebControls.Label Label53;
  protected System.Web.UI.WebControls.TextBox txt_ip_site1;
  protected System.Web.UI.WebControls.TextBox txt_ip_site2;
  protected System.Web.UI.WebControls.Label Label54;
  protected System.Web.UI.WebControls.Label Label55;
  protected System.Web.UI.WebControls.TextBox txt_zone_ospf_site1;
  protected System.Web.UI.WebControls.TextBox txt_zone_ospf_site2;
  protected System.Web.UI.WebControls.TextBox txt_mask_site1;
  protected System.Web.UI.WebControls.TextBox txt_mask_site2;
  protected System.Web.UI.WebControls.Label Label56;
  protected System.Web.UI.WebControls.RadioButtonList cable_nms_vbus_site2;
  protected System.Web.UI.WebControls.RadioButtonList cable_nms_vbus_site1;
  protected System.Web.UI.WebControls.Label Label57;
  protected System.Web.UI.WebControls.RadioButtonList label_nms_vbus_site1;
  protected System.Web.UI.WebControls.RadioButtonList label_nms_vbus_site2;
  protected System.Web.UI.WebControls.Label Label58;
  protected System.Web.UI.WebControls.Label Label59;
  protected System.Web.UI.WebControls.Label Label60;
  protected System.Web.UI.WebControls.RadioButtonList deconnection_affluent_site1;
  protected System.Web.UI.WebControls.RadioButtonList deconnection_affluent_site2;
  protected System.Web.UI.WebControls.RadioButtonList deconnection_idu_odu_site1;
  protected System.Web.UI.WebControls.RadioButtonList deconnection_idu_odu_site2;
  protected System.Web.UI.WebControls.Label Label61;
  protected System.Web.UI.WebControls.Label Label62;
  protected System.Web.UI.WebControls.Label Label63;
  protected System.Web.UI.WebControls.Label Label64;
  protected System.Web.UI.WebControls.Label Label65;
  protected System.Web.UI.WebControls.RadioButtonList agregat_idu_site1;
  protected System.Web.UI.WebControls.RadioButtonList agregat_idu_site2;
  protected System.Web.UI.WebControls.RadioButtonList agregat_odu_site1;
  protected System.Web.UI.WebControls.RadioButtonList agregat_odu_site2;
  protected System.Web.UI.WebControls.RadioButtonList rf_site1;
  protected System.Web.UI.WebControls.RadioButtonList rf_site2;
  protected System.Web.UI.WebControls.RadioButtonList affl_distant_site1;
  protected System.Web.UI.WebControls.RadioButtonList affl_distant_site2;
  protected System.Web.UI.WebControls.Label Label66;
  protected System.Web.UI.WebControls.Label Label67;
  protected System.Web.UI.WebControls.Label Label68;
  protected System.Web.UI.WebControls.Label Label69;
  protected System.Web.UI.WebControls.Label Label70;
  protected System.Web.UI.WebControls.Label Label71;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_tx1x_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_tx1x_site2;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_txx1_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_txx1_site2;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_rx1x_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_rx1x_site2;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_rxx1_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_aut_rxx1_site2;
  protected System.Web.UI.WebControls.Label Label72;
  protected System.Web.UI.WebControls.Label Label73;
  protected System.Web.UI.WebControls.Label Label74;
  protected System.Web.UI.WebControls.Label Label75;
  protected System.Web.UI.WebControls.Label Label76;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_tx1x_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_tx1x_site2;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_txx1_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_txx1_site2;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_rx1x_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_rx1x_site2;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_rxx1_site1;
  protected System.Web.UI.WebControls.RadioButtonList comm_man_rxx1_site2;
  protected System.Web.UI.WebControls.Label Label77;
  protected System.Web.UI.WebControls.Label Label78;
  protected System.Web.UI.WebControls.RadioButtonList coffret_indoor_idu_site1;
  protected System.Web.UI.WebControls.RadioButtonList coffret_indoor_idu_site2;
  protected System.Web.UI.WebControls.Label Label79;
  protected System.Web.UI.WebControls.Label Label80;
  protected System.Web.UI.WebControls.Label Label81;
  protected System.Web.UI.WebControls.RadioButtonList cables_indoor_coax_site1;
  protected System.Web.UI.WebControls.RadioButtonList cables_indoor_coax_site2;
  protected System.Web.UI.WebControls.Label Label82;
  protected System.Web.UI.WebControls.RadioButtonList cables_indoor_energie_site1;
  protected System.Web.UI.WebControls.RadioButtonList cables_indoor_energie_site2;
  protected System.Web.UI.WebControls.Label Label83;
  protected System.Web.UI.WebControls.RadioButtonList cables_indoor_pcm_site1;
  protected System.Web.UI.WebControls.RadioButtonList cables_indoor_pcm_site2;
  protected System.Web.UI.WebControls.Label Label84;
  protected System.Web.UI.WebControls.Label Label85;
  protected System.Web.UI.WebControls.RadioButtonList bandeau_indoor_disjoncteur_site1;
  protected System.Web.UI.WebControls.RadioButtonList bandeau_indoor_disjoncteur_site2;
  protected System.Web.UI.WebControls.Label Label86;
  protected System.Web.UI.WebControls.RadioButtonList bandeau_indoor_19_site1;
  protected System.Web.UI.WebControls.RadioButtonList bandeau_indoor_19_site2;
  protected System.Web.UI.WebControls.Label Label87;
  protected System.Web.UI.WebControls.RadioButtonList bandeau_indoor_fermeDDF_site1;
  protected System.Web.UI.WebControls.RadioButtonList bandeau_indoor_fermeDDF_site2;
  protected System.Web.UI.WebControls.Label Label88;
  protected System.Web.UI.WebControls.Label Label89;
  protected System.Web.UI.WebControls.RadioButtonList coffret_outdoor_odu_site1;
  protected System.Web.UI.WebControls.RadioButtonList coffret_outdoor_odu_site2;
  protected System.Web.UI.WebControls.Label Label90;
  protected System.Web.UI.WebControls.Label Label91;
  protected System.Web.UI.WebControls.RadioButtonList cables_outdoor_coax_site1;
  protected System.Web.UI.WebControls.RadioButtonList cables_outdoor_coax_site2;
  protected System.Web.UI.WebControls.Label Label92;
  protected System.Web.UI.WebControls.RadioButtonList test_qualite;
  protected System.Web.UI.WebControls.Label Label93;
  protected System.Web.UI.WebControls.TextBox txt_duree;
  protected System.Web.UI.WebControls.Label Label94;
  protected System.Web.UI.WebControls.Label Label95;
  protected System.Web.UI.WebControls.RadioButtonList proprete_installation_site1;
  protected System.Web.UI.WebControls.RadioButtonList proprete_installation_site2;
  protected System.Web.UI.WebControls.Label Label96;
  protected System.Web.UI.WebControls.Label Label97;
  protected System.Web.UI.WebControls.CheckBox conforme;
  protected System.Web.UI.WebControls.Label Label98;
  protected System.Web.UI.WebControls.RadioButtonList reserves;
  protected System.Web.UI.WebControls.Label Label99;
  protected System.Web.UI.WebControls.Button btn_valider;
  protected System.Web.UI.WebControls.TextBox txt_observations;
  protected System.Web.UI.WebControls.Button btn_ok;
  protected System.Web.UI.WebControls.TextBox txt_heure;
  protected System.Web.UI.WebControls.Label Label100;
  protected System.Web.UI.WebControls.RadioButtonList list_proprete_site2;
  protected System.Web.UI.WebControls.RadioButtonList list_proprete_site1;
  protected System.Web.UI.WebControls.Label Label101;
  protected System.Web.UI.WebControls.TextBox txt_loss;
  protected System.Web.UI.WebControls.DropDownList list1;
  protected System.Web.UI.WebControls.ImageButton btn_search;
  protected System.Web.UI.WebControls.Label lbl_erreur;
  protected System.Web.UI.WebControls.Label Label102;
  protected System.Web.UI.WebControls.Label Label103;
  protected System.Web.UI.WebControls.Label Label104;
  protected System.Web.UI.WebControls.Label Label105;
  protected System.Web.UI.WebControls.Label Label106;
  protected System.Web.UI.WebControls.Label Label107;
  protected System.Web.UI.WebControls.TextBox TextBox1;
  protected System.Web.UI.WebControls.TextBox TextBox2;
  protected System.Web.UI.WebControls.TextBox TextBox3;
  protected System.Web.UI.WebControls.TextBox TextBox4;
  protected System.Web.UI.WebControls.TextBox TextBox5;
  protected System.Web.UI.WebControls.TextBox txt_fournisseur;
  protected System.Web.UI.WebControls.TextBox TextBox6;
  protected System.Web.UI.WebControls.TextBox txt_NomDate_client;
  protected System.Web.UI.WebControls.TextBox txt_NomDate_fournisseur;
  protected System.Web.UI.WebControls.Label Label108;
  protected System.Web.UI.WebControls.RadioButtonList atpc;
  protected System.Web.UI.WebControls.Label Label109;
  protected System.Web.UI.WebControls.RadioButtonList odu_conf_hd;
  protected System.Web.UI.WebControls.RadioButtonList odu_conf_hp;
  protected System.Web.UI.WebControls.Label Label110;
  protected System.Web.UI.WebControls.Label Label111;
  protected System.Web.UI.WebControls.Label Label112;
  protected System.Web.UI.WebControls.Label Label113;
  protected System.Web.UI.WebControls.RadioButtonList v11_card_site1;
  protected System.Web.UI.WebControls.RadioButtonList v11_card_site2;
  protected System.Web.UI.WebControls.Label Label114;
  protected System.Web.UI.WebControls.TextBox txt_Date2;
  protected System.Web.UI.WebControls.ImageButton Imagebutton2;
  protected System.Web.UI.WebControls.Calendar Calendar2;
  protected System.Web.UI.WebControls.Calendar Calendar3;
  protected System.Web.UI.WebControls.Button Button1;
  protected System.Web.UI.WebControls.DropDownList list_model_equipment;
  protected System.Web.UI.WebControls.RadioButtonList odu_conf_nd;
  protected System.Web.UI.WebControls.Calendar Calendar1;
 
  private void Page_Load(object sender, System.EventArgs e)
  {
   if (Session["fonction"].ToString()  == "acceptance" || Session["fonction"].ToString()  == "admin" || Session["fonction"].ToString()  == "LL")
   { 
    SqlConnection conn1 = new SqlConnection();
    //conn1.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=INES;Packet Size=4096;Workstation ID=INES;";
    conn1.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=dttpe005;Packet Size=4096;Workstation ID=dttpe005;";
    conn1.Open();

    SqlDataAdapter da1 = new SqlDataAdapter();
    DataSet ds1 = new DataSet();
    SqlCommand cmd1 = new SqlCommand("link_name_D7T");
    cmd1.Connection = conn1;
    cmd1.CommandType = CommandType.StoredProcedure;
    da1.SelectCommand = cmd1;
    da1.Fill(ds1);
    DataTable t = new DataTable();
    t = ds1.Tables[0];
    int i = 0;
    foreach (DataRow r1 in t.Rows)
    {
     list1.Items.Add(r1["link_name"].ToString());
     i++;
    }

    conn1.Close();
   }
   else
    Response.Redirect("access_denied.aspx");
  }

  #region Code généré par le Concepteur Web Form
  override protected void OnInit(EventArgs e)
  {
   //
   // CODEGEN : Cet appel est requis par le Concepteur Web Form ASP.NET.
   //
   InitializeComponent();
   base.OnInit(e);
  }
  
  /// <summary>
  /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
  /// le contenu de cette méthode avec l'éditeur de code.
  /// </summary>
  private void InitializeComponent()
  {   
   this.Calendar3.SelectionChanged += new System.EventHandler(this.Calendar3_SelectionChanged);
   this.Imagebutton2.Click += new System.Web.UI.ImageClickEventHandler(this.Imagebutton2_Click);
   this.txt_Date2.TextChanged += new System.EventHandler(this.txt_Date2_TextChanged);
   this.btn_search.Click += new System.Web.UI.ImageClickEventHandler(this.btn_search_Click);
   this.Calendar1.SelectionChanged += new System.EventHandler(this.Calendar1_SelectionChanged);
   this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);
   this.txt_Date.TextChanged += new System.EventHandler(this.txt_Date_TextChanged);
   this.btn_valider.Click += new System.EventHandler(this.btn_valider_Click);
   this.Button1.Click += new System.EventHandler(this.Button1_Click);
   this.Load += new System.EventHandler(this.Page_Load);

  }
  #endregion

  private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
  {
   Calendar1.Visible = true;
  }

  private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
  {
   System.DateTime dtime;
   dtime = Calendar1.SelectedDate;
   txt_Date.Text = dtime.ToShortDateString();
   Calendar1.Visible = false;
  }

  private void txt_Date_TextChanged(object sender, System.EventArgs e)
  {
   Calendar1.Visible = false;
  }

  private void btn_valider_Click(object sender, System.EventArgs e)
  {
   test_qualite.BackColor = Color.Transparent;
   resultat_energie.BackColor = Color.Transparent;
   reserves.BackColor = Color.Transparent;
   brakon_site1.BackColor = Color.Transparent;
   brakon_site2.BackColor = Color.Transparent;
   mise_a_terre_rack_site1.BackColor = Color.Transparent;
   mise_a_terre_rack_site2.BackColor = Color.Transparent;
   mise_a_terre_idu_site1.BackColor = Color.Transparent;
   mise_a_terre_idu_site2.BackColor = Color.Transparent;
   mise_a_terre_odu_site1.BackColor = Color.Transparent;
   mise_a_terre_odu_site2.BackColor = Color.Transparent;
   mise_a_terre_cableIF_site1.BackColor = Color.Transparent;
   mise_a_terre_cableIF_site2.BackColor = Color.Transparent;
   etancheite_odu_site1.BackColor = Color.Transparent;
   etancheite_odu_site2.BackColor = Color.Transparent;
   etancheite_tremie_site1.BackColor = Color.Transparent;
   etancheite_tremie_site2.BackColor = Color.Transparent;
   etancheite_proprete_site1.BackColor = Color.Transparent;
   etancheite_proprete_site2.BackColor = Color.Transparent;
   cable_nms_vbus_site1.BackColor = Color.Transparent;
   cable_nms_vbus_site2.BackColor = Color.Transparent;
   label_nms_vbus_site1.BackColor = Color.Transparent;
   label_nms_vbus_site2.BackColor = Color.Transparent;
   coffret_indoor_idu_site1.BackColor = Color.Transparent;
   coffret_indoor_idu_site2.BackColor = Color.Transparent;
   cables_indoor_coax_site1.BackColor = Color.Transparent;
   cables_indoor_coax_site2.BackColor = Color.Transparent;
   cables_indoor_energie_site1.BackColor = Color.Transparent;
   cables_indoor_energie_site2.BackColor = Color.Transparent;
   cables_indoor_pcm_site1.BackColor = Color.Transparent;
   cables_indoor_pcm_site2.BackColor = Color.Transparent;
   bandeau_indoor_disjoncteur_site1.BackColor = Color.Transparent;
   bandeau_indoor_disjoncteur_site2.BackColor = Color.Transparent;
   bandeau_indoor_19_site1.BackColor = Color.Transparent;
   bandeau_indoor_19_site2.BackColor = Color.Transparent;
   bandeau_indoor_fermeDDF_site1.BackColor = Color.Transparent;
   bandeau_indoor_fermeDDF_site2.BackColor = Color.Transparent;
   coffret_outdoor_odu_site1.BackColor = Color.Transparent;
   coffret_outdoor_odu_site2.BackColor = Color.Transparent;
   cables_outdoor_coax_site1.BackColor = Color.Transparent;
   cables_outdoor_coax_site2.BackColor = Color.Transparent;
   deconnection_affluent_site1.BackColor = Color.Transparent;
   deconnection_affluent_site2.BackColor = Color.Transparent;
   deconnection_idu_odu_site1.BackColor = Color.Transparent;
   deconnection_idu_odu_site2.BackColor = Color.Transparent;
   agregat_idu_site1.BackColor = Color.Transparent;
   agregat_idu_site2.BackColor = Color.Transparent;
   agregat_odu_site1.BackColor = Color.Transparent;
   agregat_odu_site2.BackColor = Color.Transparent;
   rf_site1.BackColor = Color.Transparent;
   rf_site2.BackColor = Color.Transparent;
   affl_distant_site1.BackColor = Color.Transparent;
   affl_distant_site2.BackColor = Color.Transparent;
   comm_aut_tx1x_site1.BackColor = Color.Transparent;
   comm_aut_tx1x_site2.BackColor = Color.Transparent;
   comm_aut_txx1_site1.BackColor = Color.Transparent;
   comm_aut_txx1_site2.BackColor = Color.Transparent;
   comm_aut_rx1x_site1.BackColor = Color.Transparent;
   comm_aut_rx1x_site2.BackColor = Color.Transparent;
   comm_aut_rxx1_site1.BackColor = Color.Transparent;
   comm_aut_rxx1_site2.BackColor = Color.Transparent;
   comm_man_tx1x_site1.BackColor = Color.Transparent;
   comm_man_tx1x_site2.BackColor = Color.Transparent;
   comm_man_txx1_site1.BackColor = Color.Transparent;
   comm_man_txx1_site2.BackColor = Color.Transparent;
   comm_man_rx1x_site1.BackColor = Color.Transparent;
   comm_man_rx1x_site2.BackColor = Color.Transparent;
   comm_man_rxx1_site1.BackColor = Color.Transparent;
   comm_man_rxx1_site2.BackColor = Color.Transparent;
   proprete_installation_site1.BackColor = Color.Transparent;
   proprete_installation_site2.BackColor = Color.Transparent;
   list_proprete_site1.BackColor = Color.Transparent;
   list_proprete_site2.BackColor = Color.Transparent;
   txt_NomDate_client.BackColor = Color.Transparent;
   txt_NomDate_fournisseur.BackColor = Color.Transparent;
   supervision.BackColor = Color.Transparent;
   atpc.BackColor = Color.Transparent;
   odu_conf_nd.BackColor = Color.Transparent;
   odu_conf_hd.BackColor = Color.Transparent;
   odu_conf_hp.BackColor = Color.Transparent;
   v11_card_site1.BackColor = Color.Transparent;
   v11_card_site2.BackColor = Color.Transparent;
   txt_puiss_em_site1.BackColor = Color.Transparent;
   txt_puiss_rec_site1.BackColor = Color.Transparent;
   txt_puiss_em_site2.BackColor = Color.Transparent;
   txt_puiss_rec_site2.BackColor = Color.Transparent;
   txt_Date.BackColor = Color.Transparent;
   txt_Date2.BackColor = Color.Transparent;
   
   ///// connexion à la base //////////////
   SqlConnection connSQL = new SqlConnection();
   //connSQL.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=INES;Packet Size=4096;Workstation ID=INES;";
   connSQL.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=dttpe005;Packet Size=4096;Workstation ID=dttpe005;";
   connSQL.Open();

            SqlDataAdapter da = new SqlDataAdapter();
   SqlCommand cmd = new SqlCommand("select_link");
   SqlParameter ln = new SqlParameter("@link_name", SqlDbType.VarChar);
   DataSet ds = new DataSet();
   cmd.Connection = connSQL;
   cmd.CommandType = CommandType.StoredProcedure;
   ln.Value = list1.SelectedItem.Text;
   cmd.Parameters.Add(ln);
   da.SelectCommand = cmd;
   da.Fill(ds);

   SqlDataAdapter da0 = new SqlDataAdapter();
   SqlCommand cmd0 = new SqlCommand("select_channel_id_1");
   SqlParameter linkid0 = new SqlParameter("@mwlink_id", SqlDbType.VarChar);
   DataSet ds0 = new DataSet();
   cmd0.Connection = connSQL;
   cmd0.CommandType = CommandType.StoredProcedure;
   linkid0.Value = ds.Tables[0].Rows[0]["mwlink_id"].ToString();
   cmd0.Parameters.Add(linkid0);
   da0.SelectCommand = cmd0;
   da0.Fill(ds0);

   if (Convert.ToInt16(ds0.Tables[0].Rows[0]["T_Channel_ID"]) == 45)
   {
    int i1 = txt_freq_em1_site1.Text.IndexOf("Mhz");
    int i2 = txt_freq_em1_site2.Text.IndexOf("Mhz");
    float f1 = Convert.ToSingle(txt_freq_em1_site1.Text.Substring(0,i1).Trim());
    float f2 = Convert.ToSingle(txt_freq_em1_site2.Text.Substring(0,i2).Trim());
               
    SqlDataAdapter da5 = new SqlDataAdapter();
    DataSet ds5 = new DataSet();
    SqlCommand cmd5 = new SqlCommand("select_Channel_ID");
    SqlParameter low_freq = new SqlParameter("@low_freq", SqlDbType.Float);
    SqlParameter heigh_freq = new SqlParameter("@heigh_freq", SqlDbType.Float);
    SqlParameter cn = new SqlParameter("@channel_number", SqlDbType.Int);
    cmd5.Connection = connSQL;
    cmd5.CommandType = CommandType.StoredProcedure;
    int nbr;
    nbr = txt_canal.Text.Length;
    cn.Value = Convert.ToInt16(txt_canal.Text.Substring(0,nbr-1));
    low_freq.Value = f1;
    heigh_freq.Value = f2;
    cmd5.Parameters.Add(low_freq);
    cmd5.Parameters.Add(heigh_freq);
    cmd5.Parameters.Add(cn);
    da5.SelectCommand = cmd5;
    da5.Fill(ds5);
    int ch = Convert.ToInt16(ds5.Tables[0].Rows[0]["T_Channel_ID"]);

    SqlDataAdapter da7 = new SqlDataAdapter();
    DataSet ds7 = new DataSet();
    SqlCommand cmd7 = new SqlCommand("select_link");
    SqlParameter link_name7 = new SqlParameter("@link_name", SqlDbType.VarChar);
    cmd7.Connection = connSQL;
    cmd7.CommandType = CommandType.StoredProcedure;
    link_name7.Value = list1.SelectedItem.Text;
    cmd7.Parameters.Add(link_name7);
    da7.SelectCommand = cmd7;
    da7.Fill(ds7);

    SqlCommand cmd4 = new SqlCommand("update_channel");
    SqlParameter T_Channel_ID4 = new SqlParameter("@T_Channel_ID",SqlDbType.Int);
    SqlParameter linkid4 = new SqlParameter("@mwlink_id",SqlDbType.VarChar);
    cmd4.Connection = connSQL;
    cmd4.CommandType = CommandType.StoredProcedure;
    T_Channel_ID4.Value = ch;
    linkid4.Value = ds7.Tables[0].Rows[0]["mwlink_id"];
       cmd4.Parameters.Add(T_Channel_ID4);
    cmd4.Parameters.Add(linkid4);
    cmd4.ExecuteNonQuery();
   }
   
   SqlCommand cmd1 = new SqlCommand("insert_test_d7t");
   SqlParameter test_qualite1 = new SqlParameter("@test_qualite",SqlDbType.VarChar);
   SqlParameter duree1 = new SqlParameter("@duree",SqlDbType.VarChar);
   SqlParameter energie_mesuree1 = new SqlParameter("@energie_mesuree",SqlDbType.Float);
   SqlParameter test_energie1 = new SqlParameter("@test_energie",SqlDbType.Bit);
   SqlParameter conforme1 = new SqlParameter("@conforme",SqlDbType.Bit);
   SqlParameter reserves1 = new SqlParameter("@reserves",SqlDbType.VarChar);
   SqlParameter observations1 = new SqlParameter("@observations",SqlDbType.VarChar);
   SqlParameter date1 = new SqlParameter("@date",SqlDbType.DateTime);
   SqlParameter mwlink_ID1 = new SqlParameter("@mwlink_ID",SqlDbType.VarChar);
   SqlParameter matricule1 = new SqlParameter("@matricule",SqlDbType.VarChar);
   SqlParameter nomDate_Client1 = new SqlParameter("@nomDate_Client",SqlDbType.VarChar);
   SqlParameter nomDate_Fournisseur1 = new SqlParameter("@nomDate_Fournisseur",SqlDbType.VarChar);
   cmd1.Connection = connSQL;
   cmd1.CommandType = CommandType.StoredProcedure;
   matricule1.Value = Session["matricule"].ToString();
   cmd1.Parameters.Add(matricule1);
   if (txt_NomDate_client.Text != "")
     nomDate_Client1.Value = txt_NomDate_client.Text;
   else goto sortie74;
   cmd1.Parameters.Add(nomDate_Client1);
   if (txt_NomDate_fournisseur.Text != "")
     nomDate_Fournisseur1.Value = txt_NomDate_fournisseur.Text;
   else goto sortie75;
   cmd1.Parameters.Add(nomDate_Fournisseur1);
   if (test_qualite.Items[0].Selected || test_qualite.Items[1].Selected  || test_qualite.Items[2].Selected)
   {
    switch(test_qualite.SelectedItem.Text)
    {
     case "OK" :
      test_qualite1.Value = "OK";
      break;
     case "NOK" :
      test_qualite1.Value = "NOK";
      break;
     case "NA" :
      test_qualite1.Value = "NA";
      break;
    }
   }
   else goto sortie1;
   cmd1.Parameters.Add(test_qualite1);
   duree1.Value = txt_duree.Text;
   cmd1.Parameters.Add(duree1);
   if (txt_energie_mesuree.Text != "")
   {
    try
    {
     energie_mesuree1.Value = Convert.ToSingle(txt_energie_mesuree.Text.Trim());
    }
    catch
    {
     lbl_erreur.Visible = true;
     lbl_erreur.Text = "Vérifiez la valeur de l'énergie !";
     connSQL.Close();
     goto fin;
    }
    if (resultat_energie.Items[0].Selected || resultat_energie.Items[1].Selected)
    {
     switch(resultat_energie.SelectedItem.Text)
     {
      case "OK" :
       test_energie1.Value = true;
       break;
      case "NOK" :
       test_energie1.Value = false;
       break;
     }
    }
    else goto sortie2;
   }
   else
   {
    energie_mesuree1.Value = -48;
    test_energie1.Value = true;
   }

   cmd1.Parameters.Add(energie_mesuree1);
   
   cmd1.Parameters.Add(test_energie1);
   if (conforme.Checked)
    conforme1.Value = true;
   else
    conforme1.Value = false;
   cmd1.Parameters.Add(conforme1);
   if (reserves.Items[0].Selected || reserves.Items[1].Selected)
   {
    switch(reserves.SelectedItem.Text)
    {
     case "MINEURES" :
      reserves1.Value = "MINEURES";
      break;
     case "MAJEURES" :
      reserves1.Value = "MAJEURES";
      break;
    }
   }
   else reserves1.Value = "SANS RESERVES";
   cmd1.Parameters.Add(reserves1);
   if (txt_observations.Text != "")
    observations1.Value = txt_observations.Text;
   else
    observations1.Value = "";
   cmd1.Parameters.Add(observations1);
   DateTime d1 = DateTime.Today;
   string d2 = txt_Date.Text + " " + txt_heure.Text;
   try
   {
    d1 = Convert.ToDateTime(d2);
   }
   catch
   {
    lbl_erreur.Visible = true;
    txt_Date.BackColor = Color.Pink;
    lbl_erreur.Text = "Vérifiez la date, l'heure doit être de la forme HH:MM:SS";
    connSQL.Close();
    goto fin;
   }
   date1.Value = d1;
   cmd1.Parameters.Add(date1);
   mwlink_ID1.Value = ds.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd1.Parameters.Add(mwlink_ID1);

   SqlCommand cmd2 = new SqlCommand("insert_antenna_d7t");
   SqlParameter num_serie_antenne_principal21 = new SqlParameter("@num_serie_antenne_principal1",SqlDbType.VarChar);
   SqlParameter num_serie_antenne_principal22 = new SqlParameter("@num_serie_antenne_principal2",SqlDbType.VarChar);
   SqlParameter num_serie_antenne_extension21 = new SqlParameter("@num_serie_antenne_extension1",SqlDbType.VarChar);
   SqlParameter num_serie_antenne_extension22 = new SqlParameter("@num_serie_antenne_extension2",SqlDbType.VarChar);
      SqlParameter nbre_antenne_principal21 = new SqlParameter("@nbre_antenne_principal1",SqlDbType.Int);
   SqlParameter nbre_antenne_principal22 = new SqlParameter("@nbre_antenne_principal2",SqlDbType.Int);
   SqlParameter nbre_antenne_extension21 = new SqlParameter("@nbre_antenne_extension1",SqlDbType.Int);
   SqlParameter nbre_antenne_extension22 = new SqlParameter("@nbre_antenne_extension2",SqlDbType.Int);
   SqlParameter hauteur_antenne_principal21 = new SqlParameter("@hauteur_antenne_principal1",SqlDbType.Float);
   SqlParameter hauteur_antenne_principal22 = new SqlParameter("@hauteur_antenne_principal2",SqlDbType.Float);
   SqlParameter hauteur_antenne_extension21 = new SqlParameter("@hauteur_antenne_extension1",SqlDbType.Float);
   SqlParameter hauteur_antenne_extension22 = new SqlParameter("@hauteur_antenne_extension2",SqlDbType.Float);
   SqlParameter brakon21 = new SqlParameter("@brakon1",SqlDbType.VarChar);
   SqlParameter brakon22 = new SqlParameter("@brakon2",SqlDbType.VarChar);
   SqlParameter site_id21 = new SqlParameter("@site_id1",SqlDbType.VarChar);
   SqlParameter site_id22 = new SqlParameter("@site_id2",SqlDbType.VarChar);
   SqlParameter mwlink_ID2 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd2.Connection = connSQL;
   cmd2.CommandType = CommandType.StoredProcedure;
            if (txt_numserie_antenne_principal_site1.Text != "")
                num_serie_antenne_principal21.Value = txt_numserie_antenne_principal_site1.Text;
   else
                num_serie_antenne_principal21.Value = "";
   cmd2.Parameters.Add(num_serie_antenne_principal21);
   if (txt_numserie_antenne_principal_site2.Text != "")
                num_serie_antenne_principal22.Value = txt_numserie_antenne_principal_site2.Text;
   else
                num_serie_antenne_principal22.Value = "";
   cmd2.Parameters.Add(num_serie_antenne_principal22);
   if (txt_numserie_antenne_extension_site1.Text != "")
                num_serie_antenne_extension21.Value = txt_numserie_antenne_extension_site1.Text;
   else
                num_serie_antenne_extension21.Value = "";
   cmd2.Parameters.Add(num_serie_antenne_extension21);
   if (txt_numserie_antenne_extension_site2.Text != "")
                num_serie_antenne_extension22.Value = txt_numserie_antenne_extension_site2.Text;
   else
    num_serie_antenne_extension22.Value = "";
   cmd2.Parameters.Add(num_serie_antenne_extension22);
   if (txt_nbre_ant_principal_site1.Text != "")
                nbre_antenne_principal21.Value = Convert.ToInt16(txt_nbre_ant_principal_site1.Text);
   else
    nbre_antenne_principal21.Value = 0;
   cmd2.Parameters.Add(nbre_antenne_principal21);
            if (txt_nbre_ant_principal_site2.Text != "")
    nbre_antenne_principal22.Value = Convert.ToInt16(txt_nbre_ant_principal_site2.Text);
   else
    nbre_antenne_principal22.Value = 0;
   cmd2.Parameters.Add(nbre_antenne_principal22);
   if (txt_nbre_ant_extension_site1.Text != "")
    nbre_antenne_extension21.Value = Convert.ToInt16(txt_nbre_ant_extension_site1.Text);
   else
    nbre_antenne_extension21.Value = 0;
   cmd2.Parameters.Add(nbre_antenne_extension21);
   if (txt_nbre_ant_extension_site2.Text != "")
    nbre_antenne_extension22.Value = Convert.ToInt16(txt_nbre_ant_extension_site2.Text);
   else
    nbre_antenne_extension22.Value = 0;
   cmd2.Parameters.Add(nbre_antenne_extension22);
   if (txt_hauteur_ant_principal_site1.Text != "")
    hauteur_antenne_principal21.Value = Convert.ToSingle(txt_hauteur_ant_principal_site1.Text);
   else
    hauteur_antenne_principal21.Value = 0;
   cmd2.Parameters.Add(hauteur_antenne_principal21);
   if (txt_hauteur_ant_principal_site2.Text != "")
    hauteur_antenne_principal22.Value = Convert.ToSingle(txt_hauteur_ant_principal_site2.Text);
   else
    hauteur_antenne_principal22.Value = 0;
   cmd2.Parameters.Add(hauteur_antenne_principal22);
   if (txt_hauteur_ant_extension_site1.Text != "")
    hauteur_antenne_extension21.Value = Convert.ToSingle(txt_hauteur_ant_extension_site1.Text);
   else
    hauteur_antenne_extension21.Value = 0;
   cmd2.Parameters.Add(hauteur_antenne_extension21);
            if (txt_hauteur_ant_extension_site2.Text != "")
                hauteur_antenne_extension22.Value = Convert.ToSingle(txt_hauteur_ant_extension_site2.Text);
   else
    hauteur_antenne_extension22.Value = 0;
   cmd2.Parameters.Add(hauteur_antenne_extension22);
   if (brakon_site1.Items[0].Selected || brakon_site1.Items[1].Selected || brakon_site1.Items[2].Selected)
   {
    switch(brakon_site1.SelectedItem.Text)
    {
     case "OK" :
      brakon21.Value = "OK";
      break;
     case "NOK" :
      brakon21.Value = "NOK";
      break;
     case "NA" :
      brakon21.Value = "NA";
      break;
    }
   }
   else goto sortie4;
   cmd2.Parameters.Add(brakon21);
   if (brakon_site2.Items[0].Selected || brakon_site2.Items[1].Selected || brakon_site2.Items[2].Selected)
   {
    switch(brakon_site2.SelectedItem.Text)
    {
     case "OK" :
      brakon22.Value = "OK";
      break;
     case "NOK" :
      brakon22.Value = "NOK";
      break;
     case "NA" :
      brakon22.Value = "NA";
      break;
    }
   }
   else goto sortie5;
   cmd2.Parameters.Add(brakon22);
            site_id21.Value = txt_site1.Text;
   cmd2.Parameters.Add(site_id21);
   site_id22.Value = txt_site2.Text;
   cmd2.Parameters.Add(site_id22);
   mwlink_ID2.Value = ds.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd2.Parameters.Add(mwlink_ID2);

   SqlCommand cmd3 = new SqlCommand("insert_equipment_d7t");
   SqlParameter model1 = new SqlParameter("@model",SqlDbType.VarChar);
   SqlParameter puissance_emise_pratique1 = new SqlParameter("@puissance_emise_pratique1",SqlDbType.Float);
   SqlParameter puissance_emise_pratique2 = new SqlParameter("@puissance_emise_pratique2",SqlDbType.Float);
   SqlParameter puissance_reçue_pratique1 = new SqlParameter("@puissance_reçue_pratique1",SqlDbType.Float);
   SqlParameter puissance_reçue_pratique2 = new SqlParameter("@puissance_reçue_pratique2",SqlDbType.Float);
   SqlParameter num_serie_idu_principal1 = new SqlParameter("@num_serie_idu_principal1",SqlDbType.VarChar);
   SqlParameter num_serie_idu_principal2 = new SqlParameter("@num_serie_idu_principal2",SqlDbType.VarChar);
   SqlParameter num_serie_idu_extension1 = new SqlParameter("@num_serie_idu_extension1",SqlDbType.VarChar);
   SqlParameter num_serie_idu_extension2 = new SqlParameter("@num_serie_idu_extension2",SqlDbType.VarChar);
   SqlParameter num_serie_odu_principal1 = new SqlParameter("@num_serie_odu_principal1",SqlDbType.VarChar);
   SqlParameter num_serie_odu_principal2 = new SqlParameter("@num_serie_odu_principal2",SqlDbType.VarChar);
   SqlParameter num_serie_odu_extension1 = new SqlParameter("@num_serie_odu_extension1",SqlDbType.VarChar);
   SqlParameter num_serie_odu_extension2 = new SqlParameter("@num_serie_odu_extension2",SqlDbType.VarChar);
   SqlParameter num_serie_rtm_principal1 = new SqlParameter("@num_serie_rtm_principal1",SqlDbType.VarChar);
   SqlParameter num_serie_rtm_principal2 = new SqlParameter("@num_serie_rtm_principal2",SqlDbType.VarChar);
   SqlParameter num_serie_rtm_extension1 = new SqlParameter("@num_serie_rtm_extension1",SqlDbType.VarChar);
   SqlParameter num_serie_rtm_extension2 = new SqlParameter("@num_serie_rtm_extension2",SqlDbType.VarChar);
   SqlParameter num_serie_controller_principal1 = new SqlParameter("@num_serie_controller_principal1",SqlDbType.VarChar);
   SqlParameter num_serie_controller_principal2 = new SqlParameter("@num_serie_controller_principal2",SqlDbType.VarChar);
   SqlParameter num_serie_controller_extension1 = new SqlParameter("@num_serie_controller_extension1",SqlDbType.VarChar);
   SqlParameter num_serie_controller_extension2 = new SqlParameter("@num_serie_controller_extension2",SqlDbType.VarChar);
   SqlParameter num_serie_TRIBint_principal1 = new SqlParameter("@num_serie_TRIBint_principal1",SqlDbType.VarChar);
   SqlParameter num_serie_TRIBint_principal2 = new SqlParameter("@num_serie_TRIBint_principal2",SqlDbType.VarChar);
   SqlParameter num_serie_TRIBint_extension1 = new SqlParameter("@num_serie_TRIBint_extension1",SqlDbType.VarChar);
   SqlParameter num_serie_TRIBint_extension2 = new SqlParameter("@num_serie_TRIBint_extension2",SqlDbType.VarChar);
   SqlParameter mise_a_terre_rack1 = new SqlParameter("@mise_a_terre_rack1",SqlDbType.VarChar);
   SqlParameter mise_a_terre_rack2 = new SqlParameter("@mise_a_terre_rack2",SqlDbType.VarChar);
   SqlParameter mise_a_terre_idu1 = new SqlParameter("@mise_a_terre_idu1",SqlDbType.VarChar);
   SqlParameter mise_a_terre_idu2 = new SqlParameter("@mise_a_terre_idu2",SqlDbType.VarChar);
   SqlParameter mise_a_terre_odu1 = new SqlParameter("@mise_a_terre_odu1",SqlDbType.VarChar);
   SqlParameter mise_a_terre_odu2 = new SqlParameter("@mise_a_terre_odu2",SqlDbType.VarChar);
   SqlParameter mise_a_terre_cableIF1 = new SqlParameter("@mise_a_terre_cableIF1",SqlDbType.VarChar);
   SqlParameter mise_a_terre_cableIF2 = new SqlParameter("@mise_a_terre_cableIF2",SqlDbType.VarChar);
   SqlParameter etancheite_odu1 = new SqlParameter("@etancheite_odu1",SqlDbType.VarChar);
   SqlParameter etancheite_odu2 = new SqlParameter("@etancheite_odu2",SqlDbType.VarChar);
   SqlParameter etancheite_tremie1 = new SqlParameter("@etancheite_tremie1",SqlDbType.VarChar);
   SqlParameter etancheite_tremie2 = new SqlParameter("@etancheite_tremie2",SqlDbType.VarChar);
   SqlParameter etancheite_proprete1 = new SqlParameter("@etancheite_proprete1",SqlDbType.VarChar);
   SqlParameter etancheite_proprete2 = new SqlParameter("@etancheite_proprete2",SqlDbType.VarChar);
   SqlParameter cable_NMS_VBUS1 = new SqlParameter("@cable_NMS_VBUS1",SqlDbType.VarChar);
   SqlParameter cable_NMS_VBUS2 = new SqlParameter("@cable_NMS_VBUS2",SqlDbType.VarChar);
   SqlParameter label_NMS_VBUS1 = new SqlParameter("@label_NMS_VBUS1",SqlDbType.VarChar);
   SqlParameter label_NMS_VBUS2 = new SqlParameter("@label_NMS_VBUS2",SqlDbType.VarChar);
      SqlParameter coffret_indoor_idu1 = new SqlParameter("@coffret_indoor_idu1",SqlDbType.VarChar);
   SqlParameter coffret_indoor_idu2 = new SqlParameter("@coffret_indoor_idu2",SqlDbType.VarChar);
   SqlParameter cables_indoor_coax1 = new SqlParameter("@cables_indoor_coax1",SqlDbType.VarChar);
   SqlParameter cables_indoor_coax2 = new SqlParameter("@cables_indoor_coax2",SqlDbType.VarChar);
   SqlParameter cables_indoor_energie1 = new SqlParameter("@cables_indoor_energie1",SqlDbType.VarChar);
   SqlParameter cables_indoor_energie2 = new SqlParameter("@cables_indoor_energie2",SqlDbType.VarChar);
   SqlParameter cables_indoor_PCM1 = new SqlParameter("@cables_indoor_PCM1",SqlDbType.VarChar);
   SqlParameter cables_indoor_PCM2 = new SqlParameter("@cables_indoor_PCM2",SqlDbType.VarChar);
   SqlParameter bandeau_indoor_disjoncteur1 = new SqlParameter("@bandeau_indoor_disjoncteur1",SqlDbType.VarChar);
   SqlParameter bandeau_indoor_disjoncteur2 = new SqlParameter("@bandeau_indoor_disjoncteur2",SqlDbType.VarChar);
   SqlParameter bandeau_indoor_191 = new SqlParameter("@bandeau_indoor_191",SqlDbType.VarChar);
   SqlParameter bandeau_indoor_192 = new SqlParameter("@bandeau_indoor_192",SqlDbType.VarChar);
   SqlParameter bandeau_indoor_ferme_DDF1 = new SqlParameter("@bandeau_indoor_ferme_DDF1",SqlDbType.VarChar);
   SqlParameter bandeau_indoor_ferme_DDF2 = new SqlParameter("@bandeau_indoor_ferme_DDF2",SqlDbType.VarChar);
   SqlParameter coffret_outdoor_odu1 = new SqlParameter("@coffret_outdoor_odu1",SqlDbType.VarChar);
   SqlParameter coffret_outdoor_odu2 = new SqlParameter("@coffret_outdoor_odu2",SqlDbType.VarChar);
   SqlParameter cables_outdoor_coax1 = new SqlParameter("@cables_outdoor_coax1",SqlDbType.VarChar);
   SqlParameter cables_outdoor_coax2 = new SqlParameter("@cables_outdoor_coax2",SqlDbType.VarChar);
   SqlParameter deconnection_affluent1 = new SqlParameter("@deconnection_affluent1",SqlDbType.VarChar);
   SqlParameter deconnection_affluent2 = new SqlParameter("@deconnection_affluent2",SqlDbType.VarChar);
   SqlParameter deconnection_IDU_ODU1 = new SqlParameter("@deconnection_IDU_ODU1",SqlDbType.VarChar);
   SqlParameter deconnection_IDU_ODU2 = new SqlParameter("@deconnection_IDU_ODU2",SqlDbType.VarChar);
   SqlParameter agregat_IDU1 = new SqlParameter("@agregat_IDU1",SqlDbType.VarChar);
   SqlParameter agregat_IDU2 = new SqlParameter("@agregat_IDU2",SqlDbType.VarChar);
   SqlParameter agregat_ODU1 = new SqlParameter("@agregat_ODU1",SqlDbType.VarChar);
   SqlParameter agregat_ODU2 = new SqlParameter("@agregat_ODU2",SqlDbType.VarChar);
   SqlParameter rf1 = new SqlParameter("@rf1",SqlDbType.VarChar);
   SqlParameter rf2 = new SqlParameter("@rf2",SqlDbType.VarChar);
   SqlParameter affl_distant1 = new SqlParameter("@affl_distant1",SqlDbType.VarChar);
   SqlParameter affl_distant2 = new SqlParameter("@affl_distant2",SqlDbType.VarChar);
   SqlParameter comm_aut_TX1_X1 = new SqlParameter("@comm_aut_TX1_X1",SqlDbType.VarChar);
   SqlParameter comm_aut_TX1_X2 = new SqlParameter("@comm_aut_TX1_X2",SqlDbType.VarChar);
   SqlParameter comm_aut_TXX_11 = new SqlParameter("@comm_aut_TXX_11",SqlDbType.VarChar);
   SqlParameter comm_aut_TXX_12 = new SqlParameter("@comm_aut_TXX_12",SqlDbType.VarChar);
   SqlParameter comm_aut_RX1_X1 = new SqlParameter("@comm_aut_RX1_X1",SqlDbType.VarChar);
   SqlParameter comm_aut_RX1_X2 = new SqlParameter("@comm_aut_RX1_X2",SqlDbType.VarChar);
   SqlParameter comm_aut_RXX_11 = new SqlParameter("@comm_aut_RXX_11",SqlDbType.VarChar);
   SqlParameter comm_aut_RXX_12 = new SqlParameter("@comm_aut_RXX_12",SqlDbType.VarChar);
   SqlParameter comm_man_TX1_X1 = new SqlParameter("@comm_man_TX1_X1",SqlDbType.VarChar);
   SqlParameter comm_man_TX1_X2 = new SqlParameter("@comm_man_TX1_X2",SqlDbType.VarChar);
   SqlParameter comm_man_TXX_11 = new SqlParameter("@comm_man_TXX_11",SqlDbType.VarChar);
   SqlParameter comm_man_TXX_12 = new SqlParameter("@comm_man_TXX_12",SqlDbType.VarChar);
   SqlParameter comm_man_RX1_X1 = new SqlParameter("@comm_man_RX1_X1",SqlDbType.VarChar);
   SqlParameter comm_man_RX1_X2 = new SqlParameter("@comm_man_RX1_X2",SqlDbType.VarChar);
   SqlParameter comm_man_RXX_11 = new SqlParameter("@comm_man_RXX_11",SqlDbType.VarChar);
   SqlParameter comm_man_RXX_12 = new SqlParameter("@comm_man_RXX_12",SqlDbType.VarChar);
   SqlParameter proprete_installation1 = new SqlParameter("@proprete_installation1",SqlDbType.VarChar);
   SqlParameter proprete_installation2 = new SqlParameter("@proprete_installation2",SqlDbType.VarChar);
   SqlParameter proprete_site1 = new SqlParameter("@proprete_site1",SqlDbType.VarChar);
   SqlParameter proprete_site2 = new SqlParameter("@proprete_site2",SqlDbType.VarChar);
   SqlParameter site_id1 = new SqlParameter("@site_id1",SqlDbType.VarChar);
   SqlParameter site_id2 = new SqlParameter("@site_id2",SqlDbType.VarChar);
   SqlParameter mwlink_ID3 = new SqlParameter("@mwlink_ID",SqlDbType.VarChar);
   SqlParameter atpc1 = new SqlParameter("@atpc", SqlDbType.VarChar);
   SqlParameter odu_conf_nd1 = new SqlParameter("@odu_conf_nd", SqlDbType.VarChar);
   SqlParameter odu_conf_hd1 = new SqlParameter("@odu_conf_hd", SqlDbType.VarChar);
   SqlParameter odu_conf_hp1 = new SqlParameter("@odu_conf_hp", SqlDbType.VarChar);
   SqlParameter v11_card1 = new SqlParameter("@v11_card_1", SqlDbType.VarChar);
   SqlParameter v11_card2 = new SqlParameter("@v11_card_2", SqlDbType.VarChar);

   cmd3.Connection = connSQL;
   cmd3.CommandType = CommandType.StoredProcedure;

   if (txt_modele_equipement.Text != "")
    model1.Value = txt_modele_equipement.Text;
   else
    model1.Value = "";
   cmd3.Parameters.Add(model1);

   if (txt_puiss_em_site1.Text != "")
   {
    try
    {
     puissance_emise_pratique1.Value = Convert.ToSingle(txt_puiss_em_site1.Text.Trim());
    }
    catch
    {
     connSQL.Close();
     txt_puiss_em_site1.BackColor = Color.Pink;
     lbl_erreur.Visible = true;
     lbl_erreur.Text = "Vérifiez la valeur du champ indiqué ci-dessous !";
     goto fin;
    }
   }
   else
    puissance_emise_pratique1.Value = 0;
   cmd3.Parameters.Add(puissance_emise_pratique1);

   if (txt_puiss_em_site2.Text != "")
   {
    try
    {
     puissance_emise_pratique2.Value = Convert.ToSingle(txt_puiss_em_site2.Text.Trim());
    }
    catch
    {
     connSQL.Close();
     txt_puiss_em_site2.BackColor = Color.Pink;
     lbl_erreur.Visible = true;
     lbl_erreur.Text = "Vérifiez la valeur du champ indiqué ci-dessous !";
     goto fin;
    }
   }
   else
    puissance_emise_pratique2.Value = 0;
   cmd3.Parameters.Add(puissance_emise_pratique2);
   if (txt_puiss_rec_site1.Text != "")
   {  
    try
    {
     puissance_reçue_pratique1.Value = Convert.ToSingle(txt_puiss_rec_site1.Text.Trim());
    }
    catch
    {
     connSQL.Close();
     txt_puiss_rec_site1.BackColor = Color.Pink;
     lbl_erreur.Visible = true;
     lbl_erreur.Text = "Vérifiez la valeur du champ indiqué ci-dessous !";
     goto fin;
    }
   }
   else
    puissance_reçue_pratique1.Value = 0;
   cmd3.Parameters.Add(puissance_reçue_pratique1);

   if (txt_puiss_rec_site2.Text != "")
   {
    try
    {
     puissance_reçue_pratique2.Value = Convert.ToSingle(txt_puiss_rec_site2.Text.Trim());
    }
    catch
    {
     connSQL.Close();
     txt_puiss_rec_site2.BackColor = Color.Pink;
     lbl_erreur.Visible = true;
     lbl_erreur.Text = "Vérifiez la valeur du champ indiqué ci-dessous !";
     goto fin;
    }
   }
   else
    puissance_reçue_pratique2.Value = 0;
   cmd3.Parameters.Add(puissance_reçue_pratique2);

   if (txt_numserie_idu_principal_site1.Text != "")
          num_serie_idu_principal1.Value = txt_numserie_idu_principal_site1.Text;
   else
    num_serie_idu_principal1.Value = "";
   cmd3.Parameters.Add(num_serie_idu_principal1);
   if (txt_numserie_idu_principal_site2.Text != "")
    num_serie_idu_principal2.Value = txt_numserie_idu_principal_site2.Text;
   else
    num_serie_idu_principal2.Value = "";
   cmd3.Parameters.Add(num_serie_idu_principal2);
   if (txt_numserie_idu_extension_site1.Text != "")
    num_serie_idu_extension1.Value = txt_numserie_idu_extension_site1.Text;
   else
    num_serie_idu_extension1.Value = "";
   cmd3.Parameters.Add(num_serie_idu_extension1);
   if (txt_numserie_idu_extension_site2.Text != "")
    num_serie_idu_extension2.Value = txt_numserie_idu_extension_site2.Text;
   else
    num_serie_idu_extension2.Value = "";
   cmd3.Parameters.Add(num_serie_idu_extension2);
   if (txt_numserie_odu_principal_site1.Text != "")
    num_serie_odu_principal1.Value = txt_numserie_odu_principal_site1.Text;
   else
    num_serie_odu_principal1.Value = "";
   cmd3.Parameters.Add(num_serie_odu_principal1);
   if (txt_numserie_odu_principal_site2.Text != "")
    num_serie_odu_principal2.Value = txt_numserie_odu_principal_site2.Text;
   else
    num_serie_odu_principal2.Value = "";
   cmd3.Parameters.Add(num_serie_odu_principal2);
   if (txt_numserie_odu_extension_site1.Text != "")
                num_serie_odu_extension1.Value = txt_numserie_odu_extension_site1.Text;
   else
    num_serie_odu_extension1.Value = "";
   cmd3.Parameters.Add(num_serie_odu_extension1);
   if (txt_numserie_odu_extension_site2.Text != "")
    num_serie_odu_extension2.Value = txt_numserie_odu_extension_site2.Text;
   else
    num_serie_odu_extension2.Value = "";
   cmd3.Parameters.Add(num_serie_odu_extension2);
   if (txt_numserie_rtm_principal_site1.Text != "")
    num_serie_rtm_principal1.Value = txt_numserie_rtm_principal_site1.Text;
   else
    num_serie_rtm_principal1.Value = "";
   cmd3.Parameters.Add(num_serie_rtm_principal1);
   if (txt_numserie_rtm_principal_site2.Text != "")
    num_serie_rtm_principal2.Value = txt_numserie_rtm_principal_site2.Text;
   else
    num_serie_rtm_principal2.Value = "";
   cmd3.Parameters.Add(num_serie_rtm_principal2);
   if (txt_numserie_rtm_extension_site1.Text != "")
    num_serie_rtm_extension1.Value = txt_numserie_rtm_extension_site1.Text;
   else
                num_serie_rtm_extension1.Value = "";
   cmd3.Parameters.Add(num_serie_rtm_extension1);
   if (txt_numserie_rtm_extension_site2.Text != "")
    num_serie_rtm_extension2.Value = txt_numserie_rtm_extension_site2.Text;
   else
    num_serie_rtm_extension2.Value = "";
   cmd3.Parameters.Add(num_serie_rtm_extension2);
   if (txt_numserie_controller_principal_site1.Text != "")
    num_serie_controller_principal1.Value = txt_numserie_controller_principal_site1.Text;
   else
    num_serie_controller_principal1.Value = "";
   cmd3.Parameters.Add(num_serie_controller_principal1);
   if (txt_numserie_controller_principal_site2.Text != "")
    num_serie_controller_principal2.Value = txt_numserie_controller_principal_site2.Text;
   else
    num_serie_controller_principal2.Value = "";
   cmd3.Parameters.Add(num_serie_controller_principal2);
   if (txt_numserie_controller_extension_site1.Text != "")
    num_serie_controller_extension1.Value = txt_numserie_controller_extension_site1.Text;
   else
    num_serie_controller_extension1.Value = "";
   cmd3.Parameters.Add(num_serie_controller_extension1);
   if (txt_numserie_controller_extension_site2.Text != "")
    num_serie_controller_extension2.Value = txt_numserie_controller_extension_site2.Text;
   else
    num_serie_controller_extension2.Value = "";
   cmd3.Parameters.Add(num_serie_controller_extension2);
   if (txt_numserie_tribint_principal_site1.Text != "")
    num_serie_TRIBint_principal1.Value = txt_numserie_tribint_principal_site1.Text;
   else
    num_serie_TRIBint_principal1.Value = "";
   cmd3.Parameters.Add(num_serie_TRIBint_principal1);
   if (txt_numserie_tribint_principal_site2.Text != "")
    num_serie_TRIBint_principal2.Value = txt_numserie_tribint_principal_site2.Text;
   else
    num_serie_TRIBint_principal2.Value = "";
   cmd3.Parameters.Add(num_serie_TRIBint_principal2);
   if (txt_numserie_tribint_extension_site1.Text != "")
    num_serie_TRIBint_extension1.Value = txt_numserie_tribint_extension_site1.Text;
   else
    num_serie_TRIBint_extension1.Value = "";
   cmd3.Parameters.Add(num_serie_TRIBint_extension1);
   if (txt_numserie_tribint_extension_site2.Text != "")
    num_serie_TRIBint_extension2.Value = txt_numserie_tribint_extension_site2.Text;
   else
    num_serie_TRIBint_extension2.Value = "";
   cmd3.Parameters.Add(num_serie_TRIBint_extension2);
   if (mise_a_terre_rack_site1.Items[0].Selected || mise_a_terre_rack_site1.Items[1].Selected || mise_a_terre_rack_site1.Items[2].Selected)
   {
    switch(mise_a_terre_rack_site1.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_rack1.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_rack1.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_rack1.Value = "NA";
      break;
    }
   }
   else goto sortie6;
   cmd3.Parameters.Add(mise_a_terre_rack1);
   if (mise_a_terre_rack_site2.Items[0].Selected || mise_a_terre_rack_site2.Items[1].Selected || mise_a_terre_rack_site2.Items[2].Selected)
   {
    switch(mise_a_terre_rack_site2.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_rack2.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_rack2.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_rack2.Value = "NA";
      break;
    }
   }
   else goto sortie7;
   cmd3.Parameters.Add(mise_a_terre_rack2);
   if (mise_a_terre_idu_site1.Items[0].Selected || mise_a_terre_idu_site1.Items[1].Selected || mise_a_terre_idu_site1.Items[2].Selected)
   {
    switch(mise_a_terre_idu_site1.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_idu1.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_idu1.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_idu1.Value = "NA";
      break;
    }
   }
   else goto sortie8;
   cmd3.Parameters.Add(mise_a_terre_idu1);
   if (mise_a_terre_idu_site2.Items[0].Selected || mise_a_terre_idu_site2.Items[1].Selected || mise_a_terre_idu_site2.Items[2].Selected)
   {
    switch(mise_a_terre_idu_site2.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_idu2.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_idu2.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_idu2.Value = "NA";
      break;
    }
   }
   else goto sortie9;
   cmd3.Parameters.Add(mise_a_terre_idu2);
   if (mise_a_terre_odu_site1.Items[0].Selected || mise_a_terre_odu_site1.Items[1].Selected || mise_a_terre_odu_site1.Items[2].Selected)
   {
    switch(mise_a_terre_odu_site1.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_odu1.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_odu1.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_odu1.Value = "NA";
      break;
    }
   }
   else goto sortie10;
   cmd3.Parameters.Add(mise_a_terre_odu1);
   if (mise_a_terre_odu_site2.Items[0].Selected || mise_a_terre_odu_site2.Items[1].Selected || mise_a_terre_odu_site2.Items[2].Selected)
   {
    switch(mise_a_terre_odu_site2.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_odu2.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_odu2.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_odu2.Value = "NA";
      break;
    }
   }
   else goto sortie11;
   cmd3.Parameters.Add(mise_a_terre_odu2);
   if (mise_a_terre_cableIF_site1.Items[0].Selected || mise_a_terre_cableIF_site1.Items[1].Selected || mise_a_terre_cableIF_site1.Items[2].Selected)
   {
    switch(mise_a_terre_cableIF_site1.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_cableIF1.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_cableIF1.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_cableIF1.Value = "NA";
      break;
    }
   }
   else goto sortie12;
   cmd3.Parameters.Add(mise_a_terre_cableIF1);
   if (mise_a_terre_cableIF_site2.Items[0].Selected || mise_a_terre_cableIF_site2.Items[1].Selected || mise_a_terre_cableIF_site2.Items[2].Selected)
   {
    switch(mise_a_terre_cableIF_site2.SelectedItem.Text)
    {
     case "OK" :
      mise_a_terre_cableIF2.Value = "OK";
      break;
     case "NOK" :
      mise_a_terre_cableIF2.Value = "NOK";
      break;
     case "NA" :
      mise_a_terre_cableIF2.Value = "NA";
      break;
    }
   }
   else goto sortie13;
   cmd3.Parameters.Add(mise_a_terre_cableIF2);
   if (etancheite_odu_site1.Items[0].Selected || etancheite_odu_site1.Items[1].Selected || etancheite_odu_site1.Items[2].Selected)
   {
    switch(etancheite_odu_site1.SelectedItem.Text)
    {
     case "OK" :
      etancheite_odu1.Value = "OK";
      break;
     case "NOK" :
      etancheite_odu1.Value = "NOK";
      break;
     case "NA" :
      etancheite_odu1.Value = "NA";
      break;
    }
   }
   else goto sortie14;
   cmd3.Parameters.Add(etancheite_odu1);
   if (etancheite_odu_site2.Items[0].Selected || etancheite_odu_site2.Items[1].Selected || etancheite_odu_site2.Items[2].Selected)
   {
    switch(etancheite_odu_site2.SelectedItem.Text)
    {
     case "OK" :
      etancheite_odu2.Value = "OK";
      break;
     case "NOK" :
      etancheite_odu2.Value = "NOK";
      break;
     case "NA" :
      etancheite_odu2.Value = "NA";
      break;
    }
   }
   else goto sortie15;
   cmd3.Parameters.Add(etancheite_odu2);
   if (etancheite_tremie_site1.Items[0].Selected || etancheite_tremie_site1.Items[1].Selected || etancheite_tremie_site1.Items[2].Selected)
   {
    switch(etancheite_tremie_site1.SelectedItem.Text)
    {
     case "OK" :
      etancheite_tremie1.Value = "OK";
      break;
     case "NOK" :
      etancheite_tremie1.Value = "NOK";
      break;
     case "NA" :
      etancheite_tremie1.Value = "NA";
      break;
    }
   }
   else goto sortie16;
   cmd3.Parameters.Add(etancheite_tremie1);
   if (etancheite_tremie_site2.Items[0].Selected || etancheite_tremie_site2.Items[1].Selected || etancheite_tremie_site2.Items[2].Selected)
   {
    switch(etancheite_tremie_site2.SelectedItem.Text)
    {
     case "OK" :
      etancheite_tremie2.Value = "OK";
      break;
     case "NOK" :
      etancheite_tremie2.Value = "NOK";
      break;
     case "NA" :
      etancheite_tremie2.Value = "NA";
      break;
    }
   }
   else goto sortie17;
   cmd3.Parameters.Add(etancheite_tremie2);
   if (etancheite_proprete_site1.Items[0].Selected || etancheite_proprete_site1.Items[1].Selected || etancheite_proprete_site1.Items[2].Selected)
   {
    switch(etancheite_proprete_site1.SelectedItem.Text)
    {
     case "OK" :
      etancheite_proprete1.Value = "OK";
      break;
     case "NOK" :
      etancheite_proprete1.Value = "NOK";
      break;
     case "NA" :
      etancheite_proprete1.Value = "NA";
      break;
    }
   }
   else goto sortie18;
   cmd3.Parameters.Add(etancheite_proprete1);
   if (etancheite_proprete_site2.Items[0].Selected || etancheite_proprete_site2.Items[1].Selected || etancheite_proprete_site2.Items[2].Selected)
   {
    switch(etancheite_proprete_site2.SelectedItem.Text)
    {
     case "OK" :
      etancheite_proprete2.Value = "OK";
      break;
     case "NOK" :
      etancheite_proprete2.Value = "NOK";
      break;
     case "NA" :
      etancheite_proprete2.Value = "NA";
      break;
    }
   }
   else goto sortie19;
   cmd3.Parameters.Add(etancheite_proprete2);
   if (cable_nms_vbus_site1.Items[0].Selected || cable_nms_vbus_site1.Items[1].Selected || cable_nms_vbus_site1.Items[2].Selected)
   {
    switch(cable_nms_vbus_site1.SelectedItem.Text)
    {
     case "OK" :
      cable_NMS_VBUS1.Value = "OK";
      break;
     case "NOK" :
      cable_NMS_VBUS1.Value = "NOK";
      break;
     case "NA" :
      cable_NMS_VBUS1.Value = "NA";
      break;
    }
   }
   else goto sortie20;
   cmd3.Parameters.Add(cable_NMS_VBUS1);
   if (cable_nms_vbus_site2.Items[0].Selected || cable_nms_vbus_site2.Items[1].Selected || cable_nms_vbus_site2.Items[2].Selected)
   {
    switch(cable_nms_vbus_site2.SelectedItem.Text)
    {
     case "OK" :
      cable_NMS_VBUS2.Value = "OK";
      break;
     case "NOK" :
      cable_NMS_VBUS2.Value = "NOK";
      break;
     case "NA" :
      cable_NMS_VBUS2.Value = "NA";
      break;
    }
   }
   else goto sortie21;
   cmd3.Parameters.Add(cable_NMS_VBUS2);
   if (label_nms_vbus_site1.Items[0].Selected || label_nms_vbus_site1.Items[1].Selected || label_nms_vbus_site1.Items[2].Selected)
   {
    switch(label_nms_vbus_site1.SelectedItem.Text)
    {
     case "OK" :
      label_NMS_VBUS1.Value = "OK";
      break;
     case "NOK" :
      label_NMS_VBUS1.Value = "NOK";
      break;
     case "NA" :
      label_NMS_VBUS1.Value = "NA";
      break;
    }
   }
   else goto sortie22;
   cmd3.Parameters.Add(label_NMS_VBUS1);
   if (label_nms_vbus_site2.Items[0].Selected || label_nms_vbus_site2.Items[1].Selected || label_nms_vbus_site2.Items[2].Selected)
   {
    switch(label_nms_vbus_site2.SelectedItem.Text)
    {
     case "OK" :
      label_NMS_VBUS2.Value = "OK";
      break;
     case "NOK" :
      label_NMS_VBUS2.Value = "NOK";
      break;
     case "NA" :
      label_NMS_VBUS2.Value = "NA";
      break;
    }
   }
   else goto sortie23;
   cmd3.Parameters.Add(label_NMS_VBUS2);
   if (coffret_indoor_idu_site1.Items[0].Selected || coffret_indoor_idu_site1.Items[1].Selected || coffret_indoor_idu_site1.Items[2].Selected)
   {
    switch(coffret_indoor_idu_site1.SelectedItem.Text)
    {
     case "OK" :
      coffret_indoor_idu1.Value = "OK";
      break;
     case "NOK" :
      coffret_indoor_idu1.Value = "NOK";
      break;
     case "NA" :
      coffret_indoor_idu1.Value = "NA";
      break;
    }
   }
   else goto sortie24;
   cmd3.Parameters.Add(coffret_indoor_idu1);
   if (coffret_indoor_idu_site2.Items[0].Selected || coffret_indoor_idu_site2.Items[1].Selected || coffret_indoor_idu_site2.Items[2].Selected)
   {
    switch(coffret_indoor_idu_site2.SelectedItem.Text)
    {
     case "OK" :
      coffret_indoor_idu2.Value = "OK";
      break;
     case "NOK" :
      coffret_indoor_idu2.Value = "NOK";
      break;
     case "NA" :
      coffret_indoor_idu2.Value = "NA";
      break;
    }
   }
   else goto sortie25;
   cmd3.Parameters.Add(coffret_indoor_idu2);
   if (cables_indoor_coax_site1.Items[0].Selected || cables_indoor_coax_site1.Items[1].Selected || cables_indoor_coax_site1.Items[2].Selected)
   {
    switch(cables_indoor_coax_site1.SelectedItem.Text)
    {
     case "OK" :
      cables_indoor_coax1.Value = "OK";
      break;
     case "NOK" :
      cables_indoor_coax1.Value = "NOK";
      break;
     case "NA" :
      cables_indoor_coax1.Value = "NA";
      break;
    }
   }
   else goto sortie26;
   cmd3.Parameters.Add(cables_indoor_coax1);
   if (cables_indoor_coax_site2.Items[0].Selected || cables_indoor_coax_site2.Items[1].Selected || cables_indoor_coax_site2.Items[2].Selected)
   {
    switch(cables_indoor_coax_site2.SelectedItem.Text)
    {
     case "OK" :
      cables_indoor_coax2.Value = "OK";
      break;
     case "NOK" :
      cables_indoor_coax2.Value = "NOK";
      break;
     case "NA" :
      cables_indoor_coax2.Value = "NA";
      break;
    }
   }
   else goto sortie27;
   cmd3.Parameters.Add(cables_indoor_coax2);
   if (cables_indoor_energie_site1.Items[0].Selected || cables_indoor_energie_site1.Items[1].Selected || cables_indoor_energie_site1.Items[2].Selected)
   {
    switch(cables_indoor_energie_site1.SelectedItem.Text)
    {
     case "OK" :
      cables_indoor_energie1.Value = "OK";
      break;
     case "NOK" :
      cables_indoor_energie1.Value = "NOK";
      break;
     case "NA" :
      cables_indoor_energie1.Value = "NA";
      break;
    }
   }
   else goto sortie28;
   cmd3.Parameters.Add(cables_indoor_energie1);
   if (cables_indoor_energie_site2.Items[0].Selected || cables_indoor_energie_site2.Items[1].Selected || cables_indoor_energie_site2.Items[2].Selected)
   {
    switch(cables_indoor_energie_site2.SelectedItem.Text)
    {
     case "OK" :
      cables_indoor_energie2.Value = "OK";
      break;
     case "NOK" :
      cables_indoor_energie2.Value = "NOK";
      break;
     case "NA" :
      cables_indoor_energie2.Value = "NA";
      break;
    }
   }
   else goto sortie29;
   cmd3.Parameters.Add(cables_indoor_energie2);
   if (cables_indoor_pcm_site1.Items[0].Selected || cables_indoor_pcm_site1.Items[1].Selected || cables_indoor_pcm_site1.Items[2].Selected)
   {
    switch(cables_indoor_pcm_site1.SelectedItem.Text)
    {
     case "OK" :
      cables_indoor_PCM1.Value = "OK";
      break;
     case "NOK" :
      cables_indoor_PCM1.Value = "NOK";
      break;
     case "NA" :
      cables_indoor_PCM1.Value = "NA";
      break;
    }
   }
   else goto sortie30;
   cmd3.Parameters.Add(cables_indoor_PCM1);
   if (cables_indoor_pcm_site2.Items[0].Selected || cables_indoor_pcm_site2.Items[1].Selected || cables_indoor_pcm_site2.Items[2].Selected)
   {
    switch(cables_indoor_pcm_site2.SelectedItem.Text)
    {
     case "OK" :
      cables_indoor_PCM2.Value = "OK";
      break;
     case "NOK" :
      cables_indoor_PCM2.Value = "NOK";
      break;
     case "NA" :
      cables_indoor_PCM2.Value = "NA";
      break;
    }
   }
   else goto sortie31;
   cmd3.Parameters.Add(cables_indoor_PCM2);
   if (bandeau_indoor_disjoncteur_site1.Items[0].Selected || bandeau_indoor_disjoncteur_site1.Items[1].Selected || bandeau_indoor_disjoncteur_site1.Items[2].Selected)
   {
    switch(bandeau_indoor_disjoncteur_site1.SelectedItem.Text)
    {
     case "OK" :
      bandeau_indoor_disjoncteur1.Value = "OK";
      break;
     case "NOK" :
      bandeau_indoor_disjoncteur1.Value = "NOK";
      break;
     case "NA" :
      bandeau_indoor_disjoncteur1.Value = "NA";
      break;
    }
   }
   else goto sortie32;
   cmd3.Parameters.Add(bandeau_indoor_disjoncteur1);
   if (bandeau_indoor_disjoncteur_site2.Items[0].Selected || bandeau_indoor_disjoncteur_site2.Items[1].Selected || bandeau_indoor_disjoncteur_site2.Items[2].Selected)
   {
    switch(bandeau_indoor_disjoncteur_site2.SelectedItem.Text)
    {
     case "OK" :
      bandeau_indoor_disjoncteur2.Value = "OK";
      break;
     case "NOK" :
      bandeau_indoor_disjoncteur2.Value = "NOK";
      break;
     case "NA" :
      bandeau_indoor_disjoncteur2.Value = "NA";
      break;
    }
   }
   else goto sortie33;
   cmd3.Parameters.Add(bandeau_indoor_disjoncteur2);
   if (bandeau_indoor_19_site1.Items[0].Selected || bandeau_indoor_19_site1.Items[1].Selected || bandeau_indoor_19_site1.Items[2].Selected)
   {
    switch(bandeau_indoor_19_site1.SelectedItem.Text)
    {
     case "OK" :
      bandeau_indoor_191.Value = "OK";
      break;
     case "NOK" :
      bandeau_indoor_191.Value = "NOK";
      break;
     case "NA" :
      bandeau_indoor_191.Value = "NA";
      break;
    }
   }
   else goto sortie34;
   cmd3.Parameters.Add(bandeau_indoor_191);
   if (bandeau_indoor_19_site2.Items[0].Selected || bandeau_indoor_19_site2.Items[1].Selected || bandeau_indoor_19_site2.Items[2].Selected)
   {
    switch(bandeau_indoor_19_site2.SelectedItem.Text)
    {
     case "OK" :
      bandeau_indoor_192.Value = "OK";
      break;
     case "NOK" :
      bandeau_indoor_192.Value = "NOK";
      break;
     case "NA" :
      bandeau_indoor_192.Value = "NA";
      break;
    }
   }
   else goto sortie35;
   cmd3.Parameters.Add(bandeau_indoor_192);
   if (bandeau_indoor_fermeDDF_site1.Items[0].Selected || bandeau_indoor_fermeDDF_site1.Items[1].Selected || bandeau_indoor_fermeDDF_site1.Items[2].Selected)
   {
    switch(bandeau_indoor_fermeDDF_site1.SelectedItem.Text)
    {
     case "OK" :
      bandeau_indoor_ferme_DDF1.Value = "OK";
      break;
     case "NOK" :
      bandeau_indoor_ferme_DDF1.Value = "NOK";
      break;
     case "NA" :
      bandeau_indoor_ferme_DDF1.Value = "NA";
      break;
    }
   }
   else goto sortie36;
   cmd3.Parameters.Add(bandeau_indoor_ferme_DDF1);
   if (bandeau_indoor_fermeDDF_site2.Items[0].Selected || bandeau_indoor_fermeDDF_site2.Items[1].Selected || bandeau_indoor_fermeDDF_site2.Items[2].Selected)
   {
    switch(bandeau_indoor_fermeDDF_site2.SelectedItem.Text)
    {
     case "OK" :
      bandeau_indoor_ferme_DDF2.Value = "OK";
      break;
     case "NOK" :
      bandeau_indoor_ferme_DDF2.Value = "NOK";
      break;
     case "NA" :
      bandeau_indoor_ferme_DDF2.Value = "NA";
      break;
    }
   }
   else goto sortie37;
   cmd3.Parameters.Add(bandeau_indoor_ferme_DDF2);
   if (coffret_outdoor_odu_site1.Items[0].Selected || coffret_outdoor_odu_site1.Items[1].Selected || coffret_outdoor_odu_site1.Items[2].Selected)
   {
    switch(coffret_outdoor_odu_site1.SelectedItem.Text)
    {
     case "OK" :
      coffret_outdoor_odu1.Value = "OK";
      break;
     case "NOK" :
      coffret_outdoor_odu1.Value = "NOK";
      break;
     case "NA" :
      coffret_outdoor_odu1.Value = "NA";
      break;
    }
   }
   else goto sortie38;
   cmd3.Parameters.Add(coffret_outdoor_odu1);
   if (coffret_outdoor_odu_site2.Items[0].Selected || coffret_outdoor_odu_site2.Items[1].Selected || coffret_outdoor_odu_site2.Items[2].Selected)
   {
    switch(coffret_outdoor_odu_site2.SelectedItem.Text)
    {
     case "OK" :
      coffret_outdoor_odu2.Value = "OK";
      break;
     case "NOK" :
      coffret_outdoor_odu2.Value = "NOK";
      break;
     case "NA" :
      coffret_outdoor_odu2.Value = "NA";
      break;
    }
   }
   else goto sortie39;
   cmd3.Parameters.Add(coffret_outdoor_odu2);
   if (cables_outdoor_coax_site1.Items[0].Selected || cables_outdoor_coax_site1.Items[1].Selected || cables_outdoor_coax_site1.Items[2].Selected)
   {
    switch(cables_outdoor_coax_site1.SelectedItem.Text)
    {
     case "OK" :
      cables_outdoor_coax1.Value = "OK";
      break;
     case "NOK" :
      cables_outdoor_coax1.Value = "NOK";
      break;
     case "NA" :
      cables_outdoor_coax1.Value = "NA";
      break;
    }
   }
   else goto sortie40;
   cmd3.Parameters.Add(cables_outdoor_coax1);
   if (cables_outdoor_coax_site2.Items[0].Selected || cables_outdoor_coax_site2.Items[1].Selected || cables_outdoor_coax_site2.Items[2].Selected)
   {
    switch(cables_outdoor_coax_site2.SelectedItem.Text)
    {
     case "OK" :
      cables_outdoor_coax2.Value = "OK";
      break;
     case "NOK" :
      cables_outdoor_coax2.Value = "NOK";
      break;
     case "NA" :
      cables_outdoor_coax2.Value = "NA";
      break;
    }
   }
   else goto sortie41;
   cmd3.Parameters.Add(cables_outdoor_coax2);
   if (deconnection_affluent_site1.Items[0].Selected || deconnection_affluent_site1.Items[1].Selected || deconnection_affluent_site1.Items[2].Selected)
   {
    switch(deconnection_affluent_site1.SelectedItem.Text)
    {
     case "OK" :
      deconnection_affluent1.Value = "OK";
      break;
     case "NOK" :
      deconnection_affluent1.Value = "NOK";
      break;
     case "NA" :
      deconnection_affluent1.Value = "NA";
      break;
    }
   }
   else goto sortie42;
   cmd3.Parameters.Add(deconnection_affluent1);
   if (deconnection_affluent_site2.Items[0].Selected || deconnection_affluent_site2.Items[1].Selected || deconnection_affluent_site2.Items[2].Selected)
   {
    switch(deconnection_affluent_site2.SelectedItem.Text)
    {
     case "OK" :
      deconnection_affluent2.Value = "OK";
      break;
     case "NOK" :
      deconnection_affluent2.Value = "NOK";
      break;
     case "NA" :
      deconnection_affluent2.Value = "NA";
      break;
    }
   }
   else goto sortie43;
   cmd3.Parameters.Add(deconnection_affluent2);
   if (deconnection_idu_odu_site1.Items[0].Selected || deconnection_idu_odu_site1.Items[1].Selected || deconnection_idu_odu_site1.Items[2].Selected)
   {
    switch(deconnection_idu_odu_site1.SelectedItem.Text)
    {
     case "OK" :
      deconnection_IDU_ODU1.Value = "OK";
      break;
     case "NOK" :
      deconnection_IDU_ODU1.Value = "NOK";
      break;
     case "NA" :
      deconnection_IDU_ODU1.Value = "NA";
      break;
    }
   }
   else goto sortie44;
   cmd3.Parameters.Add(deconnection_IDU_ODU1);
   if (deconnection_idu_odu_site2.Items[0].Selected || deconnection_idu_odu_site2.Items[1].Selected || deconnection_idu_odu_site2.Items[2].Selected)
   {
    switch(deconnection_idu_odu_site2.SelectedItem.Text)
    {
     case "OK" :
      deconnection_IDU_ODU2.Value = "OK";
      break;
     case "NOK" :
      deconnection_IDU_ODU2.Value = "NOK";
      break;
     case "NA" :
      deconnection_IDU_ODU2.Value = "NA";
      break;
    }
   }
   else goto sortie45;
   cmd3.Parameters.Add(deconnection_IDU_ODU2);
   if (agregat_idu_site1.Items[0].Selected || agregat_idu_site1.Items[1].Selected || agregat_idu_site1.Items[2].Selected)
   {
    switch(agregat_idu_site1.SelectedItem.Text)
    {
     case "OK" :
      agregat_IDU1.Value = "OK";
      break;
     case "NOK" :
      agregat_IDU1.Value = "NOK";
      break;
     case "NA" :
      agregat_IDU1.Value = "NA";
      break;
    }
   }
   else goto sortie46;
   cmd3.Parameters.Add(agregat_IDU1);
   if (agregat_idu_site2.Items[0].Selected || agregat_idu_site2.Items[1].Selected || agregat_idu_site2.Items[2].Selected)
   {
    switch(agregat_idu_site2.SelectedItem.Text)
    {
     case "OK" :
      agregat_IDU2.Value = "OK";
      break;
     case "NOK" :
      agregat_IDU2.Value = "NOK";
      break;
     case "NA" :
      agregat_IDU2.Value = "NA";
      break;
    }
   }
   else goto sortie47;
   cmd3.Parameters.Add(agregat_IDU2);
   if (agregat_odu_site1.Items[0].Selected || agregat_odu_site1.Items[1].Selected || agregat_odu_site1.Items[2].Selected)
   {
    switch(agregat_odu_site1.SelectedItem.Text)
    {
     case "OK" :
      agregat_ODU1.Value = "OK";
      break;
     case "NOK" :
      agregat_ODU1.Value = "NOK";
      break;
     case "NA" :
      agregat_ODU1.Value = "NA";
      break;
    }
   }
   else goto sortie48;
   cmd3.Parameters.Add(agregat_ODU1);
   if (agregat_odu_site2.Items[0].Selected || agregat_odu_site2.Items[1].Selected || agregat_odu_site2.Items[2].Selected)
   {
    switch(agregat_odu_site2.SelectedItem.Text)
    {
     case "OK" :
      agregat_ODU2.Value = "OK";
      break;
     case "NOK" :
      agregat_ODU2.Value = "NOK";
      break;
     case "NA" :
      agregat_ODU2.Value = "NA";
      break;
    }
   }
   else goto sortie49;
   cmd3.Parameters.Add(agregat_ODU2);
   if (rf_site1.Items[0].Selected || rf_site1.Items[1].Selected || rf_site1.Items[2].Selected)
   {
    switch(rf_site1.SelectedItem.Text)
    {
     case "OK" :
      rf1.Value = "OK";
      break;
     case "NOK" :
      rf1.Value = "NOK";
      break;
     case "NA" :
      rf1.Value = "NA";
      break;
    }
   }
   else goto sortie50;
   cmd3.Parameters.Add(rf1);
   if (rf_site2.Items[0].Selected || rf_site2.Items[1].Selected || rf_site2.Items[2].Selected)
   {
    switch(rf_site2.SelectedItem.Text)
    {
     case "OK" :
      rf2.Value = "OK";
      break;
     case "NOK" :
      rf2.Value = "NOK";
      break;
     case "NA" :
      rf2.Value = "NA";
      break;
    }
   }
   else goto sortie51;
   cmd3.Parameters.Add(rf2);
   if (affl_distant_site1.Items[0].Selected || affl_distant_site1.Items[1].Selected || affl_distant_site1.Items[2].Selected)
   {
    switch(affl_distant_site1.SelectedItem.Text)
    {
     case "OK" :
      affl_distant1.Value = "OK";
      break;
     case "NOK" :
      affl_distant1.Value = "NOK";
      break;
     case "NA" :
      affl_distant1.Value = "NA";
      break;
    }
   }
   else goto sortie52;
   cmd3.Parameters.Add(affl_distant1);
   if (affl_distant_site2.Items[0].Selected || affl_distant_site2.Items[1].Selected || affl_distant_site2.Items[2].Selected)
   {
    switch(affl_distant_site2.SelectedItem.Text)
    {
     case "OK" :
      affl_distant2.Value = "OK";
      break;
     case "NOK" :
      affl_distant2.Value = "NOK";
      break;
     case "NA" :
      affl_distant2.Value = "NA";
      break;
    }
   }
   else goto sortie53;
   cmd3.Parameters.Add(affl_distant2);
   if (comm_aut_tx1x_site1.Items[0].Selected || comm_aut_tx1x_site1.Items[1].Selected || comm_aut_tx1x_site1.Items[2].Selected)
   {
    switch(comm_aut_tx1x_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_TX1_X1.Value = "OK";
      break;
     case "NOK" :
      comm_aut_TX1_X1.Value = "NOK";
      break;
     case "NA" :
      comm_aut_TX1_X1.Value = "NA";
      break;
    }
   }
   else goto sortie54;
   cmd3.Parameters.Add(comm_aut_TX1_X1);
   if (comm_aut_tx1x_site2.Items[0].Selected || comm_aut_tx1x_site2.Items[1].Selected || comm_aut_tx1x_site2.Items[2].Selected)
   {
    switch(comm_aut_tx1x_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_TX1_X2.Value = "OK";
      break;
     case "NOK" :
      comm_aut_TX1_X2.Value = "NOK";
      break;
     case "NA" :
      comm_aut_TX1_X2.Value = "NA";
      break;
    }
   }
   else goto sortie55;
   cmd3.Parameters.Add(comm_aut_TX1_X2);
   if (comm_aut_txx1_site1.Items[0].Selected || comm_aut_txx1_site1.Items[1].Selected || comm_aut_txx1_site1.Items[2].Selected)
   {
    switch(comm_aut_txx1_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_TXX_11.Value = "OK";
      break;
     case "NOK" :
      comm_aut_TXX_11.Value = "NOK";
      break;
     case "NA" :
      comm_aut_TXX_11.Value = "NA";
      break;
    }
   }
   else goto sortie56;
   cmd3.Parameters.Add(comm_aut_TXX_11);
   if (comm_aut_txx1_site2.Items[0].Selected || comm_aut_txx1_site2.Items[1].Selected || comm_aut_txx1_site2.Items[2].Selected)
   {
    switch(comm_aut_txx1_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_TXX_12.Value = "OK";
      break;
     case "NOK" :
      comm_aut_TXX_12.Value = "NOK";
      break;
     case "NA" :
      comm_aut_TXX_12.Value = "NA";
      break;
    }
   }
   else goto sortie57;
   cmd3.Parameters.Add(comm_aut_TXX_12);
   if (comm_aut_rx1x_site1.Items[0].Selected || comm_aut_rx1x_site1.Items[1].Selected || comm_aut_rx1x_site1.Items[2].Selected)
   {
    switch(comm_aut_rx1x_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_RX1_X1.Value = "OK";
      break;
     case "NOK" :
      comm_aut_RX1_X1.Value = "NOK";
      break;
     case "NA" :
      comm_aut_RX1_X1.Value = "NA";
      break;
    }
   }
   else goto sortie58;
   cmd3.Parameters.Add(comm_aut_RX1_X1);
   if (comm_aut_rx1x_site2.Items[0].Selected || comm_aut_rx1x_site2.Items[1].Selected || comm_aut_rx1x_site2.Items[2].Selected)
   {
    switch(comm_aut_rx1x_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_RX1_X2.Value = "OK";
      break;
     case "NOK" :
      comm_aut_RX1_X2.Value = "NOK";
      break;
     case "NA" :
      comm_aut_RX1_X2.Value = "NA";
      break;
    }
   }
   else goto sortie59;
   cmd3.Parameters.Add(comm_aut_RX1_X2);
   if (comm_aut_rxx1_site1.Items[0].Selected || comm_aut_rxx1_site1.Items[1].Selected || comm_aut_rxx1_site1.Items[2].Selected)
   {
    switch(comm_aut_rxx1_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_RXX_11.Value = "OK";
      break;
     case "NOK" :
      comm_aut_RXX_11.Value = "NOK";
      break;
     case "NA" :
      comm_aut_RXX_11.Value = "NA";
      break;
    }
   }
   else goto sortie60;
   cmd3.Parameters.Add(comm_aut_RXX_11);
   if (comm_aut_rxx1_site2.Items[0].Selected || comm_aut_rxx1_site2.Items[1].Selected || comm_aut_rxx1_site2.Items[2].Selected)
   {
    switch(comm_aut_rxx1_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_aut_RXX_12.Value = "OK";
      break;
     case "NOK" :
      comm_aut_RXX_12.Value = "NOK";
      break;
     case "NA" :
      comm_aut_RXX_12.Value = "NA";
      break;
    }
   }
   else goto sortie61;
   cmd3.Parameters.Add(comm_aut_RXX_12);
   if (comm_man_tx1x_site1.Items[0].Selected || comm_man_tx1x_site1.Items[1].Selected || comm_man_tx1x_site1.Items[2].Selected)
   {
    switch(comm_man_tx1x_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_man_TX1_X1.Value = "OK";
      break;
     case "NOK" :
      comm_man_TX1_X1.Value = "NOK";
      break;
     case "NA" :
      comm_man_TX1_X1.Value = "NA";
      break;
    }
   }
   else goto sortie62;
   cmd3.Parameters.Add(comm_man_TX1_X1);
   if (comm_man_tx1x_site2.Items[0].Selected || comm_man_tx1x_site2.Items[1].Selected || comm_man_tx1x_site2.Items[2].Selected)
   {
    switch(comm_man_tx1x_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_man_TX1_X2.Value = "OK";
      break;
     case "NOK" :
      comm_man_TX1_X2.Value = "NOK";
      break;
     case "NA" :
      comm_man_TX1_X2.Value = "NA";
      break;
    }
   }
   else goto sortie63;
   cmd3.Parameters.Add(comm_man_TX1_X2);
   if (comm_man_txx1_site1.Items[0].Selected || comm_man_txx1_site1.Items[1].Selected || comm_man_txx1_site1.Items[2].Selected)
   {
    switch(comm_man_txx1_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_man_TXX_11.Value = "OK";
      break;
     case "NOK" :
      comm_man_TXX_11.Value = "NOK";
      break;
     case "NA" :
      comm_man_TXX_11.Value = "NA";
      break;
    }
   }
   else goto sortie64;
   cmd3.Parameters.Add(comm_man_TXX_11);
   if (comm_man_txx1_site2.Items[0].Selected || comm_man_txx1_site2.Items[1].Selected || comm_man_txx1_site2.Items[2].Selected)
   {
    switch(comm_man_txx1_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_man_TXX_12.Value = "OK";
      break;
     case "NOK" :
      comm_man_TXX_12.Value = "NOK";
      break;
     case "NA" :
      comm_man_TXX_12.Value = "NA";
      break;
    }
   }
   else goto sortie65;
   cmd3.Parameters.Add(comm_man_TXX_12);
   if (comm_man_rx1x_site1.Items[0].Selected || comm_man_rx1x_site1.Items[1].Selected || comm_man_rx1x_site1.Items[2].Selected)
   {
    switch(comm_man_rx1x_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_man_RX1_X1.Value = "OK";
      break;
     case "NOK" :
      comm_man_RX1_X1.Value = "NOK";
      break;
     case "NA" :
      comm_man_RX1_X1.Value = "NA";
      break;
    }
   }
   else goto sortie66;
   cmd3.Parameters.Add(comm_man_RX1_X1);
   if (comm_man_rx1x_site2.Items[0].Selected || comm_man_rx1x_site2.Items[1].Selected || comm_man_rx1x_site2.Items[2].Selected)
   {
    switch(comm_man_rx1x_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_man_RX1_X2.Value = "OK";
      break;
     case "NOK" :
      comm_man_RX1_X2.Value = "NOK";
      break;
     case "NA" :
      comm_man_RX1_X2.Value = "NA";
      break;
    }
   }
   else goto sortie67;
   cmd3.Parameters.Add(comm_man_RX1_X2);
   if (comm_man_rxx1_site1.Items[0].Selected || comm_man_rxx1_site1.Items[1].Selected || comm_man_rxx1_site1.Items[2].Selected)
   {
    switch(comm_man_rxx1_site1.SelectedItem.Text)
    {
     case "OK" :
      comm_man_RXX_11.Value = "OK";
      break;
     case "NOK" :
      comm_man_RXX_11.Value = "NOK";
      break;
     case "NA" :
      comm_man_RXX_11.Value = "NA";
      break;
    }
   }
   else goto sortie68;
   cmd3.Parameters.Add(comm_man_RXX_11);
   if (comm_man_rxx1_site2.Items[0].Selected || comm_man_rxx1_site2.Items[1].Selected || comm_man_rxx1_site2.Items[2].Selected)
   {
    switch(comm_man_rxx1_site2.SelectedItem.Text)
    {
     case "OK" :
      comm_man_RXX_12.Value = "OK";
      break;
     case "NOK" :
      comm_man_RXX_12.Value = "NOK";
      break;
     case "NA" :
      comm_man_RXX_12.Value = "NA";
      break;
    }
   }
   else goto sortie69;
   cmd3.Parameters.Add(comm_man_RXX_12);
   if (proprete_installation_site1.Items[0].Selected || proprete_installation_site1.Items[1].Selected || proprete_installation_site1.Items[2].Selected)
   {
    switch(proprete_installation_site1.SelectedItem.Text)
    {
     case "OK" :
      proprete_installation1.Value = "OK";
      break;
     case "NOK" :
      proprete_installation1.Value = "NOK";
      break;
     case "NA" :
      proprete_installation1.Value = "NA";
      break;
    }
   }
   else goto sortie70;
   cmd3.Parameters.Add(proprete_installation1);
   if (proprete_installation_site2.Items[0].Selected || proprete_installation_site2.Items[1].Selected || proprete_installation_site2.Items[2].Selected)
   {
    switch(proprete_installation_site2.SelectedItem.Text)
    {
     case "OK" :
      proprete_installation2.Value = "OK";
      break;
     case "NOK" :
      proprete_installation2.Value = "NOK";
      break;
     case "NA" :
      proprete_installation2.Value = "NA";
      break;
    }
   }
   else goto sortie71;
   cmd3.Parameters.Add(proprete_installation2);
   if (list_proprete_site1.Items[0].Selected || list_proprete_site1.Items[1].Selected || list_proprete_site1.Items[2].Selected)
   {
    switch(list_proprete_site1.SelectedItem.Text)
    {
     case "OK" :
      proprete_site1.Value = "OK";
      break;
     case "NOK" :
      proprete_site1.Value = "NOK";
      break;
     case "NA" :
      proprete_site1.Value = "NA";
      break;
    }
   }
   else goto sortie72;
   cmd3.Parameters.Add(proprete_site1);
   if (list_proprete_site2.Items[0].Selected || list_proprete_site2.Items[1].Selected || list_proprete_site2.Items[2].Selected)
   {
    switch(list_proprete_site2.SelectedItem.Text)
    {
     case "OK" :
      proprete_site2.Value = "OK";
      break;
     case "NOK" :
      proprete_site2.Value = "NOK";
      break;
     case "NA" :
      proprete_site2.Value = "NA";
      break;
    }
   }
   else goto sortie73;
   cmd3.Parameters.Add(proprete_site2);
   if (atpc.Items[0].Selected || atpc.Items[1].Selected || atpc.Items[2].Selected)
   {
    switch(atpc.SelectedItem.Text)
    {
     case "OK" :
      atpc1.Value = "OK";
      break;
     case "NOK" :
      atpc1.Value = "NOK";
      break;
     case "NA" :
      atpc1.Value = "NA";
      break;
    }
   }
   else goto sortie76;
   cmd3.Parameters.Add(atpc1);
   if (odu_conf_nd.Items[0].Selected || odu_conf_nd.Items[1].Selected || odu_conf_nd.Items[2].Selected)
   {
    switch(odu_conf_nd.SelectedItem.Text)
    {
     case "OK" :
      odu_conf_nd1.Value = "OK";
      break;
     case "NOK" :
      odu_conf_nd1.Value = "NOK";
      break;
     case "NA" :
      odu_conf_nd1.Value = "NA";
      break;
    }
   }
   else goto sortie77;
   cmd3.Parameters.Add(odu_conf_nd1);
   if (odu_conf_hd.Items[0].Selected || odu_conf_hd.Items[1].Selected || odu_conf_hd.Items[2].Selected)
   {
    switch(odu_conf_hd.SelectedItem.Text)
    {
     case "OK" :
      odu_conf_hd1.Value = "OK";
      break;
     case "NOK" :
      odu_conf_hd1.Value = "NOK";
      break;
     case "NA" :
      odu_conf_hd1.Value = "NA";
      break;
    }
   }
   else goto sortie78;
   cmd3.Parameters.Add(odu_conf_hd1);
   if (odu_conf_hp.Items[0].Selected || odu_conf_hp.Items[1].Selected || odu_conf_hp.Items[2].Selected)
   {
    switch(odu_conf_hp.SelectedItem.Text)
    {
     case "OK" :
      odu_conf_hp1.Value = "OK";
      break;
     case "NOK" :
      odu_conf_hp1.Value = "NOK";
      break;
     case "NA" :
      odu_conf_hp1.Value = "NA";
      break;
    }
   }
   else goto sortie79;
   cmd3.Parameters.Add(odu_conf_hp1);
   if (v11_card_site1.Items[0].Selected || v11_card_site1.Items[1].Selected || v11_card_site1.Items[2].Selected)
   {
    switch(v11_card_site1.SelectedItem.Text)
    {
     case "OK" :
      v11_card1.Value = "OK";
      break;
     case "NOK" :
      v11_card1.Value = "NOK";
      break;
     case "NA" :
      v11_card1.Value = "NA";
      break;
    }
   }
   else goto sortie80;
   cmd3.Parameters.Add(v11_card1);
   if (v11_card_site2.Items[0].Selected || v11_card_site2.Items[1].Selected || v11_card_site2.Items[2].Selected)
   {
    switch(v11_card_site2.SelectedItem.Text)
    {
     case "OK" :
      v11_card2.Value = "OK";
      break;
     case "NOK" :
      v11_card2.Value = "NOK";
      break;
     case "NA" :
      v11_card2.Value = "NA";
      break;
    }
   }
   else goto sortie81;
   cmd3.Parameters.Add(v11_card2);

   site_id1.Value = txt_site1.Text;
   cmd3.Parameters.Add(site_id1);
   site_id2.Value = txt_site2.Text;
   cmd3.Parameters.Add(site_id2);
   mwlink_ID3.Value = ds.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd3.Parameters.Add(mwlink_ID3);

   SqlCommand cmd6 = new SqlCommand("update_link_supervision");
   SqlParameter mwlink_id6 = new SqlParameter("@mwlink_id",SqlDbType.VarChar);
   SqlParameter supervised6 = new SqlParameter("@supervised",SqlDbType.Bit);
   cmd6.Connection = connSQL;
   cmd6.CommandType = CommandType.StoredProcedure;
   mwlink_id6.Value = ds.Tables[0].Rows[0]["mwlink_ID"].ToString();
   if (supervision.Items[0].Selected == true)
    supervised6.Value = true;
   else
   {
    if (supervision.Items[1].Selected == true)
     supervised6.Value = false;
    else goto sortie0;
   }
   cmd6.Parameters.Add(mwlink_id6);
   cmd6.Parameters.Add(supervised6);

   SqlCommand cmd_7 = new SqlCommand("update_commissioning");
   SqlParameter linkid7 = new SqlParameter("@mwlink_id",SqlDbType.VarChar);
   SqlParameter date7 = new SqlParameter("@date",SqlDbType.VarChar);
   cmd_7.Connection = connSQL;
   cmd_7.CommandType = CommandType.StoredProcedure;
   linkid7.Value = ds.Tables[0].Rows[0]["mwlink_ID"].ToString();
   if (txt_Date2.Text != "")
    date7.Value = txt_Date2.Text;
   else
   {
    connSQL.Close();
    txt_Date2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   cmd_7.Parameters.Add(linkid7);
   cmd_7.Parameters.Add(date7);

   
   OleDbConnection conn_trans = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\DTTPE005\\DATABASE\\transmission.mdb; User Id=admin;Password=;");
   conn_trans.Open();
   string query = "UPDATE Links SET acceptance = '" + txt_Date.Text + "', commissioning = '" + txt_Date2.Text + "' WHERE NAME = '" + ds.Tables[0].Rows[0]["mwlink_ID"].ToString() + "'";
   OleDbCommand cmd_trans = new OleDbCommand(query);
   cmd_trans.Connection = conn_trans;
   
   cmd1.ExecuteNonQuery();
   cmd2.ExecuteNonQuery();
   cmd3.ExecuteNonQuery();
   cmd6.ExecuteNonQuery();
   cmd_7.ExecuteNonQuery();
   cmd_trans.ExecuteNonQuery();

   connSQL.Close();
   conn_trans.Close();

   Response.Redirect("D7T_Form.aspx");
   
   sortie0 :
   {
    connSQL.Close();
    supervision.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }

   sortie1 :
   {
    connSQL.Close();
    test_qualite.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie2 :
   {
                connSQL.Close();
    resultat_energie.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   
   sortie4 :
   {
                connSQL.Close();
    brakon_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie5 :
   {
                connSQL.Close();
    brakon_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie6 :
   {
                connSQL.Close();
    mise_a_terre_rack_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie7 :
   {
                connSQL.Close();
    mise_a_terre_rack_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie8 :
   {
                connSQL.Close();
    mise_a_terre_idu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie9 :
   {
                connSQL.Close();
    mise_a_terre_idu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie10 :
   {
    connSQL.Close();
    mise_a_terre_odu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie11 :
   {
    connSQL.Close();
    mise_a_terre_odu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie12 :
   {
    connSQL.Close();
    mise_a_terre_cableIF_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie13 :
   {
    connSQL.Close();
    mise_a_terre_cableIF_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie14 :
   {
    connSQL.Close();
    etancheite_odu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie15 :
   {
    connSQL.Close();
    etancheite_odu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie16 :
   {
    connSQL.Close();
    etancheite_tremie_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie17 :
   {
    connSQL.Close();
    etancheite_tremie_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie18 :
   {
    connSQL.Close();
    etancheite_proprete_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie19 :
   {
    connSQL.Close();
    etancheite_proprete_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie20 :
   {
    connSQL.Close();
    cable_nms_vbus_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie21 :
   {
    connSQL.Close();
    cable_nms_vbus_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie22 :
   {
    connSQL.Close();
    label_nms_vbus_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie23 :
   {
    connSQL.Close();
    label_nms_vbus_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie24 :
   {
    connSQL.Close();
    coffret_indoor_idu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie25 :
   {
    connSQL.Close();
    coffret_indoor_idu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie26 :
   {
    connSQL.Close();
    cables_indoor_coax_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie27 :
   {
    connSQL.Close();
    cables_indoor_coax_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie28 :
   {
    connSQL.Close();
    cables_indoor_energie_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie29 :
   {
    connSQL.Close();
    cables_indoor_energie_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie30 :
   {
    connSQL.Close();
    cables_indoor_pcm_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie31 :
   {
    connSQL.Close();
    cables_indoor_pcm_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie32 :
   {
    connSQL.Close();
    bandeau_indoor_disjoncteur_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie33 :
   {
    connSQL.Close();
    bandeau_indoor_disjoncteur_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie34 :
   {
    connSQL.Close();
    bandeau_indoor_19_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie35 :
   {
    connSQL.Close();
    bandeau_indoor_19_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie36 :
   {
    connSQL.Close();
    bandeau_indoor_fermeDDF_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie37 :
   {
    connSQL.Close();
    bandeau_indoor_fermeDDF_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie38 :
   {
    connSQL.Close();
    coffret_outdoor_odu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie39 :
   {
    connSQL.Close();
    coffret_outdoor_odu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie40 :
   {
    connSQL.Close();
    cables_outdoor_coax_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie41 :
   {
    connSQL.Close();
    cables_outdoor_coax_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie42 :
   {
    connSQL.Close();
    deconnection_affluent_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie43 :
   {
    connSQL.Close();
    deconnection_affluent_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie44 :
   {
    connSQL.Close();
    deconnection_idu_odu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie45 :
   {
    connSQL.Close();
    deconnection_idu_odu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie46 :
   {
    connSQL.Close();
    agregat_idu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie47 :
   {
    connSQL.Close();
    agregat_idu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie48 :
   {
    connSQL.Close();
    agregat_odu_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie49 :
   {
    connSQL.Close();
    agregat_odu_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie50 :
   {
    connSQL.Close();
    rf_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie51 :
   {
    connSQL.Close();
    rf_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie52 :
   {
    connSQL.Close();
    affl_distant_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie53 :
   {
    connSQL.Close();
    affl_distant_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie54 :
   {
    connSQL.Close();
    comm_aut_tx1x_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie55 :
   {
    connSQL.Close();
    comm_aut_tx1x_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie56 :
   {
    connSQL.Close();
    comm_aut_txx1_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie57 :
   {
    connSQL.Close();
    comm_aut_txx1_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie58 :
   {
    connSQL.Close();
    comm_aut_rx1x_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie59 :
   {
    connSQL.Close();
    comm_aut_rx1x_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie60 :
   {
    connSQL.Close();
    comm_aut_rxx1_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie61 :
   {
    connSQL.Close();
    comm_aut_rxx1_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie62 :
   {
    connSQL.Close();
    comm_man_tx1x_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie63 :
   {
    connSQL.Close();
    comm_man_tx1x_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie64 :
   {
    connSQL.Close();
    comm_man_txx1_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie65 :
   {
    connSQL.Close();
    comm_man_txx1_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie66 :
   {
    connSQL.Close();
    comm_man_rx1x_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie67 :
   {
    connSQL.Close();
    comm_man_rx1x_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie68 :
   {
    connSQL.Close();
    comm_man_rxx1_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie69 :
   {
    connSQL.Close();
    comm_man_rxx1_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie70 :
   {
    connSQL.Close();
    proprete_installation_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie71 :
   {
    connSQL.Close();
    proprete_installation_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie72 :
   {
    connSQL.Close();
    list_proprete_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie73 :
   {
    connSQL.Close();
    list_proprete_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie74 :
   {
    connSQL.Close();
    txt_NomDate_client.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie75 :
   {
    connSQL.Close();
    txt_NomDate_fournisseur.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie76 :
   {
    connSQL.Close();
    atpc.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie77 :
   {
    connSQL.Close();
    odu_conf_nd.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie78 :
   {
    connSQL.Close();
    odu_conf_hd.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie79 :
   {
    connSQL.Close();
    odu_conf_hp.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie80 :
   {
    connSQL.Close();
    v11_card_site1.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   sortie81 :
   {
    connSQL.Close();
    v11_card_site2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   fin : {}
  }

  private void btn_search_Click(object sender, System.Web.UI.ImageClickEventArgs e)
  {
   this.list_model_equipment.Visible = false;
   this.affl_distant_site1.ClearSelection();
   this.affl_distant_site2.ClearSelection();
   this.agregat_idu_site1.ClearSelection();
   this.agregat_idu_site2.ClearSelection();
   this.agregat_odu_site1.ClearSelection();
   this.agregat_odu_site2.ClearSelection();
   this.bandeau_indoor_19_site1.ClearSelection();
   this.bandeau_indoor_19_site2.ClearSelection();
   this.bandeau_indoor_disjoncteur_site1.ClearSelection();
   this.bandeau_indoor_disjoncteur_site2.ClearSelection();
   this.bandeau_indoor_fermeDDF_site1.ClearSelection();
   this.bandeau_indoor_fermeDDF_site2.ClearSelection();
   this.brakon_site1.ClearSelection();
   this.brakon_site2.ClearSelection();
   this.cable_nms_vbus_site1.ClearSelection();
   this.cable_nms_vbus_site2.ClearSelection();
   this.cables_indoor_coax_site1.ClearSelection();
   this.cables_indoor_coax_site2.ClearSelection();
   this.cables_indoor_energie_site1.ClearSelection();
   this.cables_indoor_energie_site2.ClearSelection();
   this.cables_indoor_pcm_site1.ClearSelection();
   this.cables_indoor_pcm_site2.ClearSelection();
   this.cables_outdoor_coax_site1.ClearSelection();
   this.cables_outdoor_coax_site2.ClearSelection();
   this.coffret_indoor_idu_site1.ClearSelection();
   this.coffret_indoor_idu_site2.ClearSelection();
   this.coffret_outdoor_odu_site1.ClearSelection();
   this.coffret_outdoor_odu_site2.ClearSelection();
   this.comm_aut_rx1x_site1.ClearSelection();
   this.comm_aut_rx1x_site2.ClearSelection();
   this.comm_aut_rxx1_site1.ClearSelection();
   this.comm_aut_rxx1_site2.ClearSelection();
   this.comm_aut_tx1x_site1.ClearSelection();
   this.comm_aut_tx1x_site2.ClearSelection();
   this.comm_aut_txx1_site1.ClearSelection();
   this.comm_aut_txx1_site2.ClearSelection();
   this.comm_man_rx1x_site1.ClearSelection();
   this.comm_man_rx1x_site2.ClearSelection();
   this.comm_man_rxx1_site1.ClearSelection();
   this.comm_man_rxx1_site2.ClearSelection();
   this.comm_man_tx1x_site1.ClearSelection();
   this.comm_man_tx1x_site2.ClearSelection();
   this.comm_man_txx1_site1.ClearSelection();
   this.comm_man_txx1_site2.ClearSelection();
   this.conforme.Checked = false;
   this.supervision.ClearSelection();
   this.deconnection_affluent_site1.ClearSelection();
   this.deconnection_affluent_site2.ClearSelection();
   this.deconnection_idu_odu_site1.ClearSelection();
   this.deconnection_idu_odu_site2.ClearSelection();
   this.etancheite_odu_site1.ClearSelection();
   this.etancheite_odu_site2.ClearSelection();
   this.etancheite_proprete_site1.ClearSelection();
   this.etancheite_proprete_site2.ClearSelection();
   this.etancheite_tremie_site1.ClearSelection();
   this.etancheite_tremie_site2.ClearSelection();
   this.label_nms_vbus_site1.ClearSelection();
   this.label_nms_vbus_site2.ClearSelection();
   this.list_proprete_site1.ClearSelection();
   this.list_proprete_site2.ClearSelection();
   this.mise_a_terre_cableIF_site1.ClearSelection();
   this.mise_a_terre_cableIF_site2.ClearSelection();
   this.mise_a_terre_idu_site1.ClearSelection();
   this.mise_a_terre_idu_site2.ClearSelection();
   this.mise_a_terre_odu_site1.ClearSelection();
   this.mise_a_terre_odu_site2.ClearSelection();
   this.mise_a_terre_rack_site1.ClearSelection();
   this.mise_a_terre_rack_site2.ClearSelection();
   this.proprete_installation_site1.ClearSelection();
   this.proprete_installation_site2.ClearSelection();
   this.reserves.ClearSelection();
   this.resultat_energie.ClearSelection();
   this.rf_site1.ClearSelection();
   this.rf_site2.ClearSelection();
   this.supervision.ClearSelection();
   this.test_qualite.ClearSelection();
   this.txt_canal.Text = "";
   this.txt_capacite_equipement.Text = "";
   this.txt_capacite_requise.Text = "";
   this.txt_configuration.Text = "";
   this.txt_Date.Text = "";
   this.txt_duree.Text = "";
   this.txt_energie_mesuree.Text = "";
   this.txt_equipementier.Text = "";
   this.txt_freq_em1_site1.Text = "";
   this.txt_freq_em1_site2.Text = "";
   this.txt_freq_em2_site1.Text = "";
   this.txt_freq_em2_site2.Text = "";
   this.txt_frequence.Text = "";
   this.txt_hauteur_ant_extension_site1.Text = "";
   this.txt_hauteur_ant_extension_site2.Text = "";
   this.txt_hauteur_ant_principal_site1.Text = "";
   this.txt_hauteur_ant_principal_site2.Text = "";
   this.txt_heure.Text = "";
   this.txt_ip_site1.Text = "";
   this.txt_ip_site2.Text = "";
   this.txt_loss.Text = "";
   this.txt_mask_site1.Text = "";
   this.txt_mask_site2.Text = "";
   this.txt_modele_equipement.Text = "";
   this.txt_nbre_ant_extension_site1.Text = "";
   this.txt_nbre_ant_extension_site2.Text = "";
   this.txt_nbre_ant_principal_site1.Text = "";
   this.txt_nbre_ant_principal_site2.Text = "";
   this.txt_numserie_antenne_extension_site1.Text = "";
   this.txt_numserie_antenne_extension_site2.Text = "";
   this.txt_numserie_antenne_principal_site1.Text = "";
   this.txt_numserie_antenne_principal_site2.Text = "";
   this.txt_numserie_controller_extension_site1.Text = "";
   this.txt_numserie_controller_extension_site2.Text = "";
   this.txt_numserie_controller_principal_site1.Text = "";
   this.txt_numserie_controller_principal_site2.Text = "";
   this.txt_numserie_idu_extension_site1.Text = "";
   this.txt_numserie_idu_extension_site2.Text = "";
   this.txt_numserie_idu_principal_site1.Text = "";
   this.txt_numserie_idu_principal_site2.Text = "";
   this.txt_numserie_odu_extension_site1.Text = "";
   this.txt_numserie_odu_extension_site2.Text = "";
   this.txt_numserie_odu_principal_site1.Text = "";
   this.txt_numserie_odu_principal_site2.Text = "";
   this.txt_numserie_rtm_extension_site1.Text = "";
   this.txt_numserie_rtm_extension_site2.Text = "";
   this.txt_numserie_rtm_principal_site1.Text = "";
   this.txt_numserie_rtm_principal_site2.Text = "";
   this.txt_numserie_tribint_extension_site1.Text = "";
   this.txt_numserie_tribint_extension_site2.Text = "";
   this.txt_numserie_tribint_principal_site1.Text = "";
   this.txt_numserie_tribint_principal_site2.Text = "";
   this.txt_observations.Text = "";
   this.txt_polarisation.Text = "";
   this.txt_puiss_em_site1.Text = "";
   this.txt_puiss_em_site2.Text = "";
   this.txt_puiss_rec_site1.Text = "";
   this.txt_puiss_rec_site2.Text = "";
   this.txt_puissance_emise_theorique.Text = "";
   this.txt_puissance_recue_theorique.Text = "";
   this.txt_site1.Text = "";
   this.txt_site2.Text = "";
   this.txt_taille_ant_extension_site1.Text = "";
   this.txt_taille_ant_extension_site2.Text = "";
   this.txt_taille_ant_principal_site1.Text = "";
   this.txt_taille_ant_principal_site2.Text = "";
   this.txt_version.Text = "";
   this.txt_zone_ospf_site1.Text = "";
   this.txt_zone_ospf_site2.Text = "";
   this.txt_NomDate_client.Text = "";
   this.txt_NomDate_fournisseur.Text = "";
   this.atpc.ClearSelection();
   this.odu_conf_hd.ClearSelection();
   this.odu_conf_hp.ClearSelection();
   this.odu_conf_nd.ClearSelection();
   this.v11_card_site1.ClearSelection();
   this.v11_card_site2.ClearSelection();
   this.txt_Date2.Text = "";
   this.list_model_equipment.ClearSelection();
   
   /////// connexion à la base /////////////////
   SqlConnection connSQL = new SqlConnection();
   //connSQL.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=INES;Packet Size=4096;Workstation ID=INES;";
   connSQL.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=dttpe005;Packet Size=4096;Workstation ID=dttpe005;";
   connSQL.Open();

   string s1, s2;

   SqlDataAdapter da1 = new SqlDataAdapter();
   DataSet ds1 = new DataSet();
   SqlCommand cmd1 = new SqlCommand("select_link");
   SqlParameter link_name = new SqlParameter("@link_name", SqlDbType.VarChar);
   cmd1.Connection = connSQL;
   cmd1.CommandType = CommandType.StoredProcedure;
   link_name.Value = list1.SelectedItem.Text;
   cmd1.Parameters.Add(link_name);
   da1.SelectCommand = cmd1;
   da1.Fill(ds1);
   txt_polarisation.Text = ds1.Tables[0].Rows[0]["polarization"].ToString();
   txt_configuration.Text = ds1.Tables[0].Rows[0]["securisation"].ToString();
   txt_Date2.Text = ds1.Tables[0].Rows[0]["commissioning"].ToString();
      
   txt_mask_site1.Text = ds1.Tables[0].Rows[0]["mask"].ToString();
   txt_mask_site2.Text = ds1.Tables[0].Rows[0]["mask"].ToString();

   SqlDataAdapter da2 = new SqlDataAdapter();
   DataSet ds2 = new DataSet();
   SqlCommand cmd2 = new SqlCommand("select_site");
   SqlParameter mwlink_ID = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd2.Connection = connSQL;
   cmd2.CommandType = CommandType.StoredProcedure;
   mwlink_ID.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd2.Parameters.Add(mwlink_ID);
   da2.SelectCommand = cmd2;
   da2.Fill(ds2);
   if (Convert.ToInt16(ds2.Tables[0].Rows[0]["number"]) == 1)
   {
    txt_site1.Text = ds2.Tables[0].Rows[0]["site_id"].ToString();
    txt_site2.Text = ds2.Tables[0].Rows[1]["site_id"].ToString();
    s1 = ds2.Tables[0].Rows[0]["site_id"].ToString();
    s2 = ds2.Tables[0].Rows[1]["site_id"].ToString();
   }
   else
   {
    txt_site2.Text = ds2.Tables[0].Rows[0]["site_id"].ToString();
    txt_site1.Text = ds2.Tables[0].Rows[1]["site_id"].ToString();
    s2 = ds2.Tables[0].Rows[0]["site_id"].ToString();
    s1 = ds2.Tables[0].Rows[1]["site_id"].ToString();
   }

   SqlDataAdapter da_3 = new SqlDataAdapter();
   DataSet ds_3 = new DataSet();
   SqlCommand cmd_3 = new SqlCommand("select_channel_id_1");
   SqlParameter linkid_3 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd_3.Connection = connSQL;
   cmd_3.CommandType = CommandType.StoredProcedure;
   linkid_3.Value = ds1.Tables[0].Rows[0]["mwlink_ID"];
   cmd_3.Parameters.Add(linkid_3);
   da_3.SelectCommand = cmd_3;
   da_3.Fill(ds_3);

   SqlDataAdapter da3 = new SqlDataAdapter();
   DataSet ds3 = new DataSet();
   SqlCommand cmd3 = new SqlCommand("select_channel");
   SqlParameter T_Channel_ID = new SqlParameter("@T_Channel_ID", SqlDbType.Int);
   cmd3.Connection = connSQL;
   cmd3.CommandType = CommandType.StoredProcedure;
   T_Channel_ID.Value = ds_3.Tables[0].Rows[0]["T_Channel_ID"];
   cmd3.Parameters.Add(T_Channel_ID);
   da3.SelectCommand = cmd3;
   da3.Fill(ds3);

   if (Convert.ToInt16(ds_3.Tables[0].Rows[0]["T_Channel_ID"]) != 45)
   {
    if (ds2.Tables[0].Rows[0]["parity"].ToString() == "H")
    {
     txt_freq_em1_site1.Text = ds3.Tables[0].Rows[0]["heigh_frequency"].ToString() + " Mhz";
     txt_freq_em1_site2.Text = ds3.Tables[0].Rows[0]["low_frequency"].ToString() + " Mhz";
    }
    else
    {
     txt_freq_em1_site1.Text = ds3.Tables[0].Rows[0]["low_frequency"].ToString() + " Mhz";
     txt_freq_em1_site2.Text = ds3.Tables[0].Rows[0]["heigh_frequency"].ToString() + " Mhz";
    }
    txt_canal.Text = ds3.Tables[0].Rows[0]["channel_number"].ToString();
   }
   Single f;
   f = Convert.ToSingle(ds3.Tables[0].Rows[0]["low_frequency"]);
   if (f > 22000 & f < 23000)
    txt_frequence.Text = "23 Ghz";
   if (f > 17000 & f < 18000)
    txt_frequence.Text = "18 Ghz";
   if (f > 14000 & f < 15000)
    txt_frequence.Text = "15 Ghz";
   
   txt_capacite_requise.Text = ds3.Tables[0].Rows[0]["rate_value"].ToString() + " E 1";

   SqlDataAdapter da4 = new SqlDataAdapter();
   DataSet ds4 = new DataSet();
   SqlCommand cmd4 = new SqlCommand("select_equipment");
   SqlParameter siteid4 = new SqlParameter("@site_id", SqlDbType.VarChar);
   SqlParameter mwlink_ID4 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd4.Connection = connSQL;
   cmd4.CommandType = CommandType.StoredProcedure;
   siteid4.Value = ds2.Tables[0].Rows[0]["site_id"].ToString();
   cmd4.Parameters.Add(siteid4);
   mwlink_ID4.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd4.Parameters.Add(mwlink_ID4);
   da4.SelectCommand = cmd4;
   da4.Fill(ds4);
   
   txt_equipementier.Text = ds4.Tables[0].Rows[0]["constructor"].ToString();
   txt_fournisseur.Text = txt_equipementier.Text;
   if (txt_equipementier.Text == "ALCATEL")
   {
    txt_version.Text = ds4.Tables[0].Rows[0]["type"].ToString();
    txt_zone_ospf_site1.Text = ds1.Tables[0].Rows[0]["ospf_zone"].ToString();
    txt_zone_ospf_site2.Text = ds1.Tables[0].Rows[0]["ospf_zone"].ToString();
   }
   if (txt_equipementier.Text == "SIEMENS")
   {
    if (ds4.Tables[0].Rows[0]["name"].ToString().IndexOf("XD") > -1)
     txt_version.Text = (ds4.Tables[0].Rows[0]["type"].ToString()).Substring(0,7);
    else
        txt_version.Text = (ds4.Tables[0].Rows[0]["type"].ToString()).Substring(0,6);
    if (txt_version.Text == "SRAL-XD")
     list_model_equipment.Visible = true;
    txt_zone_ospf_site1.Text = ds1.Tables[0].Rows[0]["area"].ToString();
    txt_zone_ospf_site2.Text = ds1.Tables[0].Rows[0]["area"].ToString();
   }
   txt_puissance_emise_theorique.Text = ds4.Tables[0].Rows[0]["th_tx_power"].ToString() + " dBm";
   txt_puissance_recue_theorique.Text = ds4.Tables[0].Rows[0]["th_rx_signal"].ToString() + " dBm";
   
   if ((txt_equipementier.Text == "SIEMENS") & (txt_configuration.Text.Trim() == "1+1") & (Convert.ToSingle(ds4.Tables[0].Rows[0]["tx_loss"]) > 3.9))
    txt_loss.Text = Convert.ToString(Convert.ToDecimal(ds4.Tables[0].Rows[0]["tx_loss"])- Convert.ToDecimal(3.9))+ " dBm";
   else
    txt_loss.Text = ds4.Tables[0].Rows[0]["tx_loss"].ToString() + " dB";
 
   int i = ds4.Tables[0].Rows[0]["name"].ToString().IndexOf("*");
   if (i > 0)
   {
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i - 1,3) == "2*2")
     txt_capacite_equipement.Text = "2 E 1";
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i - 1,3) == "4*2")
     txt_capacite_equipement.Text = "4 E 1";
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i - 1,3) == "8*2")
     txt_capacite_equipement.Text = "8 E 1";
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i - 2,4) == "16*2")
     txt_capacite_equipement.Text = "16 E 1";
   }
   else
   {
    int i1 = ds4.Tables[0].Rows[0]["name"].ToString().IndexOf("x");
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i1 - 1,3) == "2x2")
     txt_capacite_equipement.Text = "2 E 1";
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i1 - 1,3) == "4x2")
     txt_capacite_equipement.Text = "4 E 1";
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i1 - 1,3) == "8x2")
     txt_capacite_equipement.Text = "8 E 1";
    if (ds4.Tables[0].Rows[0]["name"].ToString().Substring(i1 - 2,4) == "16x2")
     txt_capacite_equipement.Text = "16 E 1";
   }

   SqlDataAdapter da5 = new SqlDataAdapter();
   DataSet ds5 = new DataSet();
   SqlCommand cmd5 = new SqlCommand("select_antenna");
   SqlParameter siteid5 = new SqlParameter("@site_id", SqlDbType.VarChar);
   SqlParameter mwlink_ID5 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd5.Connection = connSQL;
   cmd5.CommandType = CommandType.StoredProcedure;
   siteid5.Value = txt_site1.Text;
   cmd5.Parameters.Add(siteid5);
   mwlink_ID5.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd5.Parameters.Add(mwlink_ID5);
   da5.SelectCommand = cmd5;
   da5.Fill(ds5);
   txt_taille_ant_principal_site1.Text = ds5.Tables[0].Rows[0]["diameter"].ToString() + " m";
            if (Convert.ToDouble(ds5.Tables[0].Rows[0]["diameter_extension"]) != 0)
    txt_taille_ant_extension_site1.Text = ds5.Tables[0].Rows[0]["diameter_extension"].ToString() + " m";
   
   SqlDataAdapter da6 = new SqlDataAdapter();
   DataSet ds6 = new DataSet();
   SqlCommand cmd6 = new SqlCommand("select_antenna");
   SqlParameter siteid6 = new SqlParameter("@site_id", SqlDbType.VarChar);
   SqlParameter mwlink_ID6 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd6.Connection = connSQL;
   cmd6.CommandType = CommandType.StoredProcedure;
   siteid6.Value = txt_site2.Text;
   cmd6.Parameters.Add(siteid6);
   mwlink_ID6.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd6.Parameters.Add(mwlink_ID6);
   da6.SelectCommand = cmd6;
   da6.Fill(ds6);
   txt_taille_ant_principal_site2.Text = ds6.Tables[0].Rows[0]["diameter"].ToString() + " m";
   if (Convert.ToDouble(ds6.Tables[0].Rows[0]["diameter_extension"]) !=  0)
    txt_taille_ant_extension_site2.Text = ds6.Tables[0].Rows[0]["diameter_extension"].ToString() + " m";

   SqlDataAdapter da7 = new SqlDataAdapter();
   DataSet ds7 = new DataSet();
   SqlCommand cmd7 = new SqlCommand("select_ip");
   SqlParameter siteid7 = new SqlParameter("@site_id", SqlDbType.VarChar);
   SqlParameter mwlink_ID7 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd7.Connection = connSQL;
   cmd7.CommandType = CommandType.StoredProcedure;
   siteid7.Value = txt_site1.Text;
   cmd7.Parameters.Add(siteid7);
   mwlink_ID7.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd7.Parameters.Add(mwlink_ID7);
   da7.SelectCommand = cmd7;
   da7.Fill(ds7);
   if (ds7.Tables[0].Rows.Count != 0)
    txt_ip_site1.Text = ds7.Tables[0].Rows[0]["ip"].ToString();

   SqlDataAdapter da8 = new SqlDataAdapter();
   DataSet ds8 = new DataSet();
   SqlCommand cmd8 = new SqlCommand("select_ip");
   SqlParameter siteid8 = new SqlParameter("@site_id", SqlDbType.VarChar);
   SqlParameter mwlink_ID8 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd8.Connection = connSQL;
   cmd8.CommandType = CommandType.StoredProcedure;
   siteid8.Value = txt_site2.Text;
   cmd8.Parameters.Add(siteid8);
   mwlink_ID8.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd8.Parameters.Add(mwlink_ID8);
   da8.SelectCommand = cmd8;
   da8.Fill(ds8);
   if (ds8.Tables[0].Rows.Count != 0)
    txt_ip_site2.Text = ds8.Tables[0].Rows[0]["ip"].ToString();

   SqlDataAdapter da9 = new SqlDataAdapter();
   DataSet ds9 = new DataSet();
   SqlCommand cmd9 = new SqlCommand("select_test");
   SqlParameter mwlink_ID9 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
   cmd9.Connection = connSQL;
   cmd9.CommandType = CommandType.StoredProcedure;
   mwlink_ID9.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd9.Parameters.Add(mwlink_ID9);
   da9.SelectCommand = cmd9;
   da9.Fill(ds9);
   if (ds9.Tables[0].Rows.Count != 0)
   {
    txt_Date.Text = Convert.ToDateTime(ds9.Tables[0].Rows[0]["date"]).Date.ToShortDateString();
       txt_heure.Text = ds9.Tables[0].Rows[0]["date"].ToString().Substring(10).Trim();
    if (ds9.Tables[0].Rows[0]["test_qualite"].ToString() == "OK")
     test_qualite.Items[0].Selected = true;
    if (ds9.Tables[0].Rows[0]["test_qualite"].ToString() == "NOK")
     test_qualite.Items[1].Selected = true;
    if (ds9.Tables[0].Rows[0]["test_qualite"].ToString() == "NA")
     test_qualite.Items[2].Selected = true;
    txt_duree.Text = ds9.Tables[0].Rows[0]["duree"].ToString();
    txt_energie_mesuree.Text = ds9.Tables[0].Rows[0]["energie_mesuree"].ToString();
    if (Convert.ToBoolean(ds9.Tables[0].Rows[0]["test_energie"]) == true)
     resultat_energie.Items[0].Selected = true;
    else
     resultat_energie.Items[1].Selected = true;
    if (Convert.ToBoolean(ds9.Tables[0].Rows[0]["conforme"]) == true)
     conforme.Checked = true;
    if (ds9.Tables[0].Rows[0]["reserves"].ToString() == "MINEURES")
     reserves.Items[0].Selected = true;
    if (ds9.Tables[0].Rows[0]["reserves"].ToString() == "MAJEURES")
     reserves.Items[1].Selected = true;
    txt_observations.Text = ds9.Tables[0].Rows[0]["observations"].ToString();
    txt_NomDate_client.Text = ds9.Tables[0].Rows[0]["nomDate_Client"].ToString();
    txt_NomDate_fournisseur.Text = ds9.Tables[0].Rows[0]["nomDate_Fournisseur"].ToString();
   

    SqlDataAdapter da10 = new SqlDataAdapter();
    DataSet ds10 = new DataSet();
    SqlCommand cmd10 = new SqlCommand("select_equipment");
    SqlParameter siteid10 = new SqlParameter("@site_id", SqlDbType.VarChar);
    SqlParameter mwlink_ID10 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
    cmd10.Connection = connSQL;
    cmd10.CommandType = CommandType.StoredProcedure;
    siteid10.Value = s1;
    cmd10.Parameters.Add(siteid10);
    mwlink_ID10.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
    cmd10.Parameters.Add(mwlink_ID10);
    da10.SelectCommand = cmd10;
    da10.Fill(ds10);
    if (ds10.Tables[0].Rows.Count != 0)
    {
     SqlDataAdapter da0 = new SqlDataAdapter();
     DataSet ds0 = new DataSet();
     SqlCommand cmd0 = new SqlCommand("select_link_1");
     SqlParameter mwlink_ID0 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
     cmd0.Connection = connSQL;
     cmd0.CommandType = CommandType.StoredProcedure;
     mwlink_ID0.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
     cmd0.Parameters.Add(mwlink_ID0);
     da0.SelectCommand = cmd0;
     da0.Fill(ds0);
     if (Convert.ToBoolean(ds0.Tables[0].Rows[0]["supervised"].ToString()) == true)
      supervision.Items[0].Selected = true;
     else
      supervision.Items[1].Selected = true;

     txt_modele_equipement.Text = ds10.Tables[0].Rows[0]["model"].ToString();
     if (txt_version.Text == "SRAL-XD")
     {
      if (txt_modele_equipement.Text == "PLUG IN")
       list_model_equipment.Items[0].Selected = true;
      else
       list_model_equipment.Items[1].Selected = true;
     }
     txt_puiss_em_site1.Text = ds10.Tables[0].Rows[0]["puissance_emise_pratique"].ToString();
     txt_puiss_rec_site1.Text = ds10.Tables[0].Rows[0]["puissance_reçue_pratique"].ToString();
     txt_numserie_idu_principal_site1.Text = ds10.Tables[0].Rows[0]["num_serie_idu_principal"].ToString();
     txt_numserie_idu_extension_site1.Text = ds10.Tables[0].Rows[0]["num_serie_idu_extension"].ToString();
     txt_numserie_odu_principal_site1.Text = ds10.Tables[0].Rows[0]["num_serie_odu_principal"].ToString();
     txt_numserie_odu_extension_site1.Text = ds10.Tables[0].Rows[0]["num_serie_odu_extension"].ToString();
     txt_numserie_rtm_principal_site1.Text = ds10.Tables[0].Rows[0]["num_serie_rtm_principal"].ToString();
     txt_numserie_rtm_extension_site1.Text = ds10.Tables[0].Rows[0]["num_serie_rtm_extension"].ToString();
     txt_numserie_controller_principal_site1.Text = ds10.Tables[0].Rows[0]["num_serie_controller_principal"].ToString();
     txt_numserie_controller_extension_site1.Text = ds10.Tables[0].Rows[0]["num_serie_controller_extension"].ToString();
     txt_numserie_tribint_principal_site1.Text = ds10.Tables[0].Rows[0]["num_serie_TRIBint_principal"].ToString();
     txt_numserie_tribint_extension_site1.Text = ds10.Tables[0].Rows[0]["num_serie_TRIBint_extension"].ToString();
     if (ds10.Tables[0].Rows[0]["mise_a_terre_rack"].ToString() == "OK")
      mise_a_terre_rack_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_rack"].ToString() == "NOK")
      mise_a_terre_rack_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_rack"].ToString() == "NA")
      mise_a_terre_rack_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_idu"].ToString() == "OK")
      mise_a_terre_idu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_idu"].ToString() == "NOK")
      mise_a_terre_idu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_idu"].ToString() == "NA")
      mise_a_terre_idu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_odu"].ToString() == "OK")
      mise_a_terre_odu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_odu"].ToString() == "NOK")
      mise_a_terre_odu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_odu"].ToString() == "NA")
      mise_a_terre_odu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_cableIF"].ToString() == "OK")
      mise_a_terre_cableIF_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_cableIF"].ToString() == "NOK")
      mise_a_terre_cableIF_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["mise_a_terre_cableIF"].ToString() == "NA")
      mise_a_terre_cableIF_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_odu"].ToString() == "OK")
      etancheite_odu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_odu"].ToString() == "NOK")
      etancheite_odu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_odu"].ToString() == "NA")
      etancheite_odu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_tremie"].ToString() == "OK")
      etancheite_tremie_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_tremie"].ToString() == "NOK")
      etancheite_tremie_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_tremie"].ToString() == "NA")
      etancheite_tremie_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_proprete"].ToString() == "OK")
      etancheite_proprete_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_proprete"].ToString() == "NOK")
      etancheite_proprete_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["etancheite_proprete"].ToString() == "NA")
      etancheite_proprete_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["cable_NMS_VBUS"].ToString() == "OK")
      cable_nms_vbus_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["cable_NMS_VBUS"].ToString() == "NOK")
      cable_nms_vbus_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["cable_NMS_VBUS"].ToString() == "NA")
      cable_nms_vbus_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["label_NMS_VBUS"].ToString() == "OK")
      label_nms_vbus_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["label_NMS_VBUS"].ToString() == "NOK")
      label_nms_vbus_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["label_NMS_VBUS"].ToString() == "NA")
      label_nms_vbus_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["coffret_indoor_idu"].ToString() == "OK")
      coffret_indoor_idu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["coffret_indoor_idu"].ToString() == "NOK")
      coffret_indoor_idu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["coffret_indoor_idu"].ToString() == "NA")
      coffret_indoor_idu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_coax"].ToString() == "OK")
      cables_indoor_coax_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_coax"].ToString() == "NOK")
      cables_indoor_coax_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_coax"].ToString() == "NA")
      cables_indoor_coax_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_energie"].ToString() == "OK")
      cables_indoor_energie_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_energie"].ToString() == "NOK")
      cables_indoor_energie_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_energie"].ToString() == "NA")
      cables_indoor_energie_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_PCM"].ToString() == "OK")
      cables_indoor_pcm_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_PCM"].ToString() == "NOK")
      cables_indoor_pcm_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_indoor_PCM"].ToString() == "NA")
      cables_indoor_pcm_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_disjoncteur"].ToString() == "OK")
      bandeau_indoor_disjoncteur_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_disjoncteur"].ToString() == "NOK")
      bandeau_indoor_disjoncteur_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_disjoncteur"].ToString() == "NA")
      bandeau_indoor_disjoncteur_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_19"].ToString() == "OK")
      bandeau_indoor_19_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_19"].ToString() == "NOK")
      bandeau_indoor_19_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_19"].ToString() == "NA")
      bandeau_indoor_19_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_ferme_DDF"].ToString() == "OK")
      bandeau_indoor_fermeDDF_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_ferme_DDF"].ToString() == "NOK")
      bandeau_indoor_fermeDDF_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["bandeau_indoor_ferme_DDF"].ToString() == "NA")
      bandeau_indoor_fermeDDF_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["coffret_outdoor_odu"].ToString() == "OK")
      coffret_outdoor_odu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["coffret_outdoor_odu"].ToString() == "NOK")
      coffret_outdoor_odu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["coffret_outdoor_odu"].ToString() == "NA")
      coffret_outdoor_odu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_outdoor_coax"].ToString() == "OK")
      cables_outdoor_coax_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_outdoor_coax"].ToString() == "NOK")
      cables_outdoor_coax_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["cables_outdoor_coax"].ToString() == "NA")
      cables_outdoor_coax_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["deconnection_affluent"].ToString() == "OK")
      deconnection_affluent_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["deconnection_affluent"].ToString() == "NOK")
      deconnection_affluent_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["deconnection_affluent"].ToString() == "NA")
      deconnection_affluent_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["deconnection_IDU_ODU"].ToString() == "OK")
      deconnection_idu_odu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["deconnection_IDU_ODU"].ToString() == "NOK")
      deconnection_idu_odu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["deconnection_IDU_ODU"].ToString() == "NA")
      deconnection_idu_odu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["agregat_IDU"].ToString() == "OK")
      agregat_idu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["agregat_IDU"].ToString() == "NOK")
      agregat_idu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["agregat_IDU"].ToString() == "NA")
      agregat_idu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["agregat_ODU"].ToString() == "OK")
      agregat_odu_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["agregat_ODU"].ToString() == "NOK")
      agregat_odu_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["agregat_ODU"].ToString() == "NA")
      agregat_odu_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["rf"].ToString() == "OK")
      rf_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["rf"].ToString() == "NOK")
      rf_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["rf"].ToString() == "NA")
      rf_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["affl_distant"].ToString() == "OK")
      affl_distant_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["affl_distant"].ToString() == "NOK")
      affl_distant_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["affl_distant"].ToString() == "NA")
      affl_distant_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_TX1_X"].ToString() == "OK")
      comm_aut_tx1x_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_TX1_X"].ToString() == "NOK")
      comm_aut_tx1x_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_TX1_X"].ToString() == "NA")
      comm_aut_tx1x_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_TXX_1"].ToString() == "OK")
      comm_aut_txx1_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_TXX_1"].ToString() == "NOK")
      comm_aut_txx1_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_TXX_1"].ToString() == "NA")
      comm_aut_txx1_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_RX1_X"].ToString() == "OK")
      comm_aut_rx1x_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_RX1_X"].ToString() == "NOK")
      comm_aut_rx1x_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_RX1_X"].ToString() == "NA")
      comm_aut_rx1x_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_RXX_1"].ToString() == "OK")
      comm_aut_rxx1_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_RXX_1"].ToString() == "NOK")
      comm_aut_rxx1_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_aut_RXX_1"].ToString() == "NA")
      comm_aut_rxx1_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_TX1_X"].ToString() == "OK")
      comm_man_tx1x_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_TX1_X"].ToString() == "NOK")
      comm_man_tx1x_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_TX1_X"].ToString() == "NA")
      comm_man_tx1x_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_TXX_1"].ToString() == "OK")
      comm_man_txx1_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_TXX_1"].ToString() == "NOK")
      comm_man_txx1_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_TXX_1"].ToString() == "NA")
      comm_man_txx1_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_RX1_X"].ToString() == "OK")
      comm_man_rx1x_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_RX1_X"].ToString() == "NOK")
      comm_man_rx1x_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_RX1_X"].ToString() == "NA")
      comm_man_rx1x_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_RXX_1"].ToString() == "OK")
      comm_man_rxx1_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_RXX_1"].ToString() == "NOK")
      comm_man_rxx1_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["comm_man_RXX_1"].ToString() == "NA")
      comm_man_rxx1_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["proprete_installation"].ToString() == "OK")
      proprete_installation_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["proprete_installation"].ToString() == "NOK")
      proprete_installation_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["proprete_installation"].ToString() == "NA")
      proprete_installation_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["proprete_site"].ToString() == "OK")
      list_proprete_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["proprete_site"].ToString() == "NOK")
      list_proprete_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["proprete_site"].ToString() == "NA")
      list_proprete_site1.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["atpc"].ToString() == "OK")
      atpc.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["atpc"].ToString() == "NOK")
      atpc.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["atpc"].ToString() == "NA")
      atpc.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_nd"].ToString() == "OK")
      odu_conf_nd.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_nd"].ToString() == "NOK")
      odu_conf_nd.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_nd"].ToString() == "NA")
      odu_conf_nd.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_hd"].ToString() == "OK")
      odu_conf_hd.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_hd"].ToString() == "NOK")
      odu_conf_hd.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_hd"].ToString() == "NA")
      odu_conf_hd.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_hp"].ToString() == "OK")
      odu_conf_hp.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_hp"].ToString() == "NOK")
      odu_conf_hp.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["odu_conf_hp"].ToString() == "NA")
      odu_conf_hp.Items[2].Selected = true;
     if (ds10.Tables[0].Rows[0]["v11_card"].ToString() == "OK")
      v11_card_site1.Items[0].Selected = true;
     if (ds10.Tables[0].Rows[0]["v11_card"].ToString() == "NOK")
      v11_card_site1.Items[1].Selected = true;
     if (ds10.Tables[0].Rows[0]["v11_card"].ToString() == "NA")
      v11_card_site1.Items[2].Selected = true;
    }

    SqlDataAdapter da11 = new SqlDataAdapter();
    DataSet ds11 = new DataSet();
    SqlCommand cmd11 = new SqlCommand("select_equipment");
    SqlParameter siteid11 = new SqlParameter("@site_id", SqlDbType.VarChar);
    SqlParameter mwlink_ID11 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
    cmd11.Connection = connSQL;
    cmd11.CommandType = CommandType.StoredProcedure;
    siteid11.Value = txt_site2.Text;
    cmd11.Parameters.Add(siteid11);
    mwlink_ID11.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
    cmd11.Parameters.Add(mwlink_ID11);
    da11.SelectCommand = cmd11;
    da11.Fill(ds11);
    if (ds11.Tables[0].Rows.Count != 0)
    {
     txt_puiss_em_site2.Text = ds11.Tables[0].Rows[0]["puissance_emise_pratique"].ToString();
     txt_puiss_rec_site2.Text = ds11.Tables[0].Rows[0]["puissance_reçue_pratique"].ToString();
     txt_numserie_idu_principal_site2.Text = ds11.Tables[0].Rows[0]["num_serie_idu_principal"].ToString();
     txt_numserie_idu_extension_site2.Text = ds11.Tables[0].Rows[0]["num_serie_idu_extension"].ToString();
     txt_numserie_odu_principal_site2.Text = ds11.Tables[0].Rows[0]["num_serie_odu_principal"].ToString();
     txt_numserie_odu_extension_site2.Text = ds11.Tables[0].Rows[0]["num_serie_odu_extension"].ToString();
     txt_numserie_rtm_principal_site2.Text = ds11.Tables[0].Rows[0]["num_serie_rtm_principal"].ToString();
     txt_numserie_rtm_extension_site2.Text = ds11.Tables[0].Rows[0]["num_serie_rtm_extension"].ToString();
     txt_numserie_controller_principal_site2.Text = ds11.Tables[0].Rows[0]["num_serie_controller_principal"].ToString();
     txt_numserie_controller_extension_site2.Text = ds11.Tables[0].Rows[0]["num_serie_controller_extension"].ToString();
     txt_numserie_tribint_principal_site2.Text = ds11.Tables[0].Rows[0]["num_serie_TRIBint_principal"].ToString();
     txt_numserie_tribint_extension_site2.Text = ds11.Tables[0].Rows[0]["num_serie_TRIBint_extension"].ToString();
     if (ds11.Tables[0].Rows[0]["mise_a_terre_rack"].ToString() == "OK")
      mise_a_terre_rack_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_rack"].ToString() == "NOK")
      mise_a_terre_rack_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_rack"].ToString() == "NA")
      mise_a_terre_rack_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_idu"].ToString() == "OK")
      mise_a_terre_idu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_idu"].ToString() == "NOK")
      mise_a_terre_idu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_idu"].ToString() == "NA")
      mise_a_terre_idu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_odu"].ToString() == "OK")
      mise_a_terre_odu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_odu"].ToString() == "NOK")
      mise_a_terre_odu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_odu"].ToString() == "NA")
      mise_a_terre_odu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_cableIF"].ToString() == "OK")
      mise_a_terre_cableIF_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_cableIF"].ToString() == "NOK")
      mise_a_terre_cableIF_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["mise_a_terre_cableIF"].ToString() == "NA")
      mise_a_terre_cableIF_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_odu"].ToString() == "OK")
      etancheite_odu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_odu"].ToString() == "NOK")
      etancheite_odu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_odu"].ToString() == "NA")
      etancheite_odu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_tremie"].ToString() == "OK")
      etancheite_tremie_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_tremie"].ToString() == "NOK")
      etancheite_tremie_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_tremie"].ToString() == "NA")
      etancheite_tremie_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_proprete"].ToString() == "OK")
      etancheite_proprete_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_proprete"].ToString() == "NOK")
      etancheite_proprete_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["etancheite_proprete"].ToString() == "NA")
      etancheite_proprete_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["cable_NMS_VBUS"].ToString() == "OK")
      cable_nms_vbus_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["cable_NMS_VBUS"].ToString() == "NOK")
      cable_nms_vbus_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["cable_NMS_VBUS"].ToString() == "NA")
      cable_nms_vbus_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["label_NMS_VBUS"].ToString() == "OK")
      label_nms_vbus_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["label_NMS_VBUS"].ToString() == "NOK")
      label_nms_vbus_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["label_NMS_VBUS"].ToString() == "NA")
      label_nms_vbus_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["coffret_indoor_idu"].ToString() == "OK")
      coffret_indoor_idu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["coffret_indoor_idu"].ToString() == "NOK")
      coffret_indoor_idu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["coffret_indoor_idu"].ToString() == "NA")
      coffret_indoor_idu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_coax"].ToString() == "OK")
      cables_indoor_coax_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_coax"].ToString() == "NOK")
      cables_indoor_coax_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_coax"].ToString() == "NA")
      cables_indoor_coax_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_energie"].ToString() == "OK")
      cables_indoor_energie_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_energie"].ToString() == "NOK")
      cables_indoor_energie_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_energie"].ToString() == "NA")
      cables_indoor_energie_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_PCM"].ToString() == "OK")
      cables_indoor_pcm_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_PCM"].ToString() == "NOK")
      cables_indoor_pcm_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_indoor_PCM"].ToString() == "NA")
      cables_indoor_pcm_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_disjoncteur"].ToString() == "OK")
      bandeau_indoor_disjoncteur_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_disjoncteur"].ToString() == "NOK")
      bandeau_indoor_disjoncteur_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_disjoncteur"].ToString() == "NA")
      bandeau_indoor_disjoncteur_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_19"].ToString() == "OK")
      bandeau_indoor_19_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_19"].ToString() == "NOK")
      bandeau_indoor_19_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_19"].ToString() == "NA")
      bandeau_indoor_19_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_ferme_DDF"].ToString() == "OK")
      bandeau_indoor_fermeDDF_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_ferme_DDF"].ToString() == "NOK")
      bandeau_indoor_fermeDDF_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["bandeau_indoor_ferme_DDF"].ToString() == "NA")
      bandeau_indoor_fermeDDF_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["coffret_outdoor_odu"].ToString() == "OK")
      coffret_outdoor_odu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["coffret_outdoor_odu"].ToString() == "NOK")
      coffret_outdoor_odu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["coffret_outdoor_odu"].ToString() == "NA")
      coffret_outdoor_odu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_outdoor_coax"].ToString() == "OK")
      cables_outdoor_coax_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_outdoor_coax"].ToString() == "NOK")
      cables_outdoor_coax_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["cables_outdoor_coax"].ToString() == "NA")
      cables_outdoor_coax_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["deconnection_affluent"].ToString() == "OK")
      deconnection_affluent_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["deconnection_affluent"].ToString() == "NOK")
      deconnection_affluent_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["deconnection_affluent"].ToString() == "NA")
      deconnection_affluent_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["deconnection_IDU_ODU"].ToString() == "OK")
      deconnection_idu_odu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["deconnection_IDU_ODU"].ToString() == "NOK")
      deconnection_idu_odu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["deconnection_IDU_ODU"].ToString() == "NA")
      deconnection_idu_odu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["agregat_IDU"].ToString() == "OK")
      agregat_idu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["agregat_IDU"].ToString() == "NOK")
      agregat_idu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["agregat_IDU"].ToString() == "NA")
      agregat_idu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["agregat_ODU"].ToString() == "OK")
      agregat_odu_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["agregat_ODU"].ToString() == "NOK")
      agregat_odu_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["agregat_ODU"].ToString() == "NA")
      agregat_odu_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["rf"].ToString() == "OK")
      rf_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["rf"].ToString() == "NOK")
      rf_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["rf"].ToString() == "NA")
      rf_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["affl_distant"].ToString() == "OK")
      affl_distant_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["affl_distant"].ToString() == "NOK")
      affl_distant_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["affl_distant"].ToString() == "NA")
      affl_distant_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_TX1_X"].ToString() == "OK")
      comm_aut_tx1x_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_TX1_X"].ToString() == "NOK")
      comm_aut_tx1x_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_TX1_X"].ToString() == "NA")
      comm_aut_tx1x_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_TXX_1"].ToString() == "OK")
      comm_aut_txx1_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_TXX_1"].ToString() == "NOK")
      comm_aut_txx1_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_TXX_1"].ToString() == "NA")
      comm_aut_txx1_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_RX1_X"].ToString() == "OK")
      comm_aut_rx1x_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_RX1_X"].ToString() == "NOK")
      comm_aut_rx1x_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_RX1_X"].ToString() == "NA")
      comm_aut_rx1x_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_RXX_1"].ToString() == "OK")
      comm_aut_rxx1_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_RXX_1"].ToString() == "NOK")
      comm_aut_rxx1_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_aut_RXX_1"].ToString() == "NA")
      comm_aut_rxx1_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_TX1_X"].ToString() == "OK")
      comm_man_tx1x_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_TX1_X"].ToString() == "NOK")
      comm_man_tx1x_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_TX1_X"].ToString() == "NA")
      comm_man_tx1x_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_TXX_1"].ToString() == "OK")
      comm_man_txx1_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_TXX_1"].ToString() == "NOK")
      comm_man_txx1_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_TXX_1"].ToString() == "NA")
      comm_man_txx1_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_RX1_X"].ToString() == "OK")
      comm_man_rx1x_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_RX1_X"].ToString() == "NOK")
      comm_man_rx1x_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_RX1_X"].ToString() == "NA")
      comm_man_rx1x_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_RXX_1"].ToString() == "OK")
      comm_man_rxx1_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_RXX_1"].ToString() == "NOK")
      comm_man_rxx1_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["comm_man_RXX_1"].ToString() == "NA")
      comm_man_rxx1_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["proprete_installation"].ToString() == "OK")
      proprete_installation_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["proprete_installation"].ToString() == "NOK")
      proprete_installation_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["proprete_installation"].ToString() == "NA")
      proprete_installation_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["proprete_site"].ToString() == "OK")
      list_proprete_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["proprete_site"].ToString() == "NOK")
      list_proprete_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["proprete_site"].ToString() == "NA")
      list_proprete_site2.Items[2].Selected = true;
     if (ds11.Tables[0].Rows[0]["v11_card"].ToString() == "OK")
      v11_card_site2.Items[0].Selected = true;
     if (ds11.Tables[0].Rows[0]["v11_card"].ToString() == "NOK")
      v11_card_site2.Items[1].Selected = true;
     if (ds11.Tables[0].Rows[0]["v11_card"].ToString() == "NA")
      v11_card_site2.Items[2].Selected = true;
    }

    SqlDataAdapter da12 = new SqlDataAdapter();
    DataSet ds12 = new DataSet();
    SqlCommand cmd12 = new SqlCommand("select_antenna");
    SqlParameter siteid12 = new SqlParameter("@site_id", SqlDbType.VarChar);
    SqlParameter mwlink_ID12 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
    cmd12.Connection = connSQL;
    cmd12.CommandType = CommandType.StoredProcedure;
    siteid12.Value = s1;
    cmd12.Parameters.Add(siteid12);
    mwlink_ID12.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
    cmd12.Parameters.Add(mwlink_ID12);
    da12.SelectCommand = cmd12;
    da12.Fill(ds12);
    if (ds12.Tables[0].Rows.Count != 0)
    {
     txt_numserie_antenne_principal_site1.Text = ds12.Tables[0].Rows[0]["num_serie_antenne_principal"].ToString();
     txt_numserie_antenne_extension_site1.Text = ds12.Tables[0].Rows[0]["num_serie_antenne_extension"].ToString();
     if (Convert.ToInt16(ds12.Tables[0].Rows[0]["nbre_antenne_principal"]) != 0)
      txt_nbre_ant_principal_site1.Text = ds12.Tables[0].Rows[0]["nbre_antenne_principal"].ToString();
     if (Convert.ToInt16(ds12.Tables[0].Rows[0]["nbre_antenne_extension"]) != 0)
      txt_nbre_ant_extension_site1.Text = ds12.Tables[0].Rows[0]["nbre_antenne_extension"].ToString();
     if (Convert.ToInt16(ds12.Tables[0].Rows[0]["hauteur_antenne_principal"]) != 0)
      txt_hauteur_ant_principal_site1.Text = ds12.Tables[0].Rows[0]["hauteur_antenne_principal"].ToString();
     if (Convert.ToInt16(ds12.Tables[0].Rows[0]["hauteur_antenne_extension"]) != 0)
      txt_hauteur_ant_extension_site1.Text = ds12.Tables[0].Rows[0]["hauteur_antenne_extension"].ToString();
     if (ds12.Tables[0].Rows[0]["brakon"].ToString() == "OK")
      brakon_site1.Items[0].Selected = true;
     if (ds12.Tables[0].Rows[0]["brakon"].ToString() == "NOK")
      brakon_site1.Items[1].Selected = true;
     if (ds12.Tables[0].Rows[0]["brakon"].ToString() == "NA")
      brakon_site1.Items[2].Selected = true;
    }

    SqlDataAdapter da13 = new SqlDataAdapter();
    DataSet ds13 = new DataSet();
    SqlCommand cmd13 = new SqlCommand("select_antenna");
    SqlParameter siteid13 = new SqlParameter("@site_id", SqlDbType.VarChar);
    SqlParameter mwlink_ID13 = new SqlParameter("@mwlink_ID", SqlDbType.VarChar);
    cmd13.Connection = connSQL;
    cmd13.CommandType = CommandType.StoredProcedure;
    siteid13.Value = s2;
    cmd13.Parameters.Add(siteid13);
    mwlink_ID13.Value = ds1.Tables[0].Rows[0]["mwlink_ID"].ToString();
    cmd13.Parameters.Add(mwlink_ID13);
    da13.SelectCommand = cmd13;
    da13.Fill(ds13);
    if (ds13.Tables[0].Rows.Count != 0)
    {
     txt_numserie_antenne_principal_site2.Text = ds13.Tables[0].Rows[0]["num_serie_antenne_principal"].ToString();
     txt_numserie_antenne_extension_site2.Text = ds13.Tables[0].Rows[0]["num_serie_antenne_extension"].ToString();
     if (Convert.ToInt16(ds13.Tables[0].Rows[0]["nbre_antenne_principal"]) != 0)
      txt_nbre_ant_principal_site2.Text = ds13.Tables[0].Rows[0]["nbre_antenne_principal"].ToString();
     if (Convert.ToInt16(ds13.Tables[0].Rows[0]["nbre_antenne_extension"]) != 0)
      txt_nbre_ant_extension_site2.Text = ds13.Tables[0].Rows[0]["nbre_antenne_extension"].ToString();
     if (Convert.ToInt16(ds13.Tables[0].Rows[0]["hauteur_antenne_principal"]) != 0)
      txt_hauteur_ant_principal_site2.Text = ds13.Tables[0].Rows[0]["hauteur_antenne_principal"].ToString();
     if (Convert.ToInt16(ds13.Tables[0].Rows[0]["hauteur_antenne_extension"]) != 0)
      txt_hauteur_ant_extension_site2.Text = ds13.Tables[0].Rows[0]["hauteur_antenne_extension"].ToString();
     if (ds13.Tables[0].Rows[0]["brakon"].ToString() == "OK")
      brakon_site2.Items[0].Selected = true;
     if (ds13.Tables[0].Rows[0]["brakon"].ToString() == "NOK")
      brakon_site2.Items[1].Selected = true;
     if (ds13.Tables[0].Rows[0]["brakon"].ToString() == "NA")
      brakon_site2.Items[2].Selected = true;
    }
   }
   connSQL.Close();
  }

  private void Imagebutton2_Click(object sender, System.Web.UI.ImageClickEventArgs e)
  {
   Calendar3.Visible = true;
  }

  private void txt_Date2_TextChanged(object sender, System.EventArgs e)
  {
   Calendar3.Visible = false;
  }

  private void Calendar3_SelectionChanged(object sender, System.EventArgs e)
  {
   System.DateTime dtime;
   dtime = Calendar3.SelectedDate;
   txt_Date2.Text = dtime.ToShortDateString();
   Calendar3.Visible = false;
  }

  private void Button1_Click(object sender, System.EventArgs e)
  {
   txt_Date2.BackColor = Color.Transparent;
   txt_Date.BackColor = Color.Transparent;

   ///// connexion à la base //////////////
   SqlConnection connSQL = new SqlConnection();
   //connSQL.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=INES;Packet Size=4096;Workstation ID=INES;";
   connSQL.ConnectionString = "Integrated Security=SSPI;Persist Security Info=False; Trusted_Connection=Yes; Initial Catalog=base_trans;Data Source=dttpe005;Packet Size=4096;Workstation ID=dttpe005;";
   connSQL.Open();

   SqlDataAdapter da = new SqlDataAdapter();
   SqlCommand cmd = new SqlCommand("select_link");
   SqlParameter ln = new SqlParameter("@link_name", SqlDbType.VarChar);
   DataSet ds = new DataSet();
   cmd.Connection = connSQL;
   cmd.CommandType = CommandType.StoredProcedure;
   ln.Value = list1.SelectedItem.Text;
   cmd.Parameters.Add(ln);
   da.SelectCommand = cmd;
   da.Fill(ds);

   OleDbConnection conn_trans = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\DTTPE005\\DATABASE\\transmission.mdb; User Id=admin;Password=;");
   conn_trans.Open();
   string query = "UPDATE Links SET acceptance = '" + txt_Date.Text + "', commissioning = '" + txt_Date2.Text + "' WHERE NAME = '" + ds.Tables[0].Rows[0]["mwlink_ID"].ToString() + "'";
   OleDbCommand cmd_trans = new OleDbCommand(query);
   cmd_trans.Connection = conn_trans;

   SqlCommand cmd_7 = new SqlCommand("update_commissioning");
   SqlParameter linkid7 = new SqlParameter("@mwlink_id",SqlDbType.VarChar);
   SqlParameter date7 = new SqlParameter("@date",SqlDbType.VarChar);
   cmd_7.Connection = connSQL;
   cmd_7.CommandType = CommandType.StoredProcedure;
   linkid7.Value = ds.Tables[0].Rows[0]["mwlink_ID"].ToString();
   if (txt_Date2.Text != "")
    date7.Value = txt_Date2.Text;
   else
   {
    connSQL.Close();
    txt_Date2.BackColor = Color.Pink;
    lbl_erreur.Visible = true;
    lbl_erreur.Text = "Veuillez remplir le champ indiqué ci-dessous !";
    goto fin;
   }
   cmd_7.Parameters.Add(linkid7);
   cmd_7.Parameters.Add(date7);

   SqlCommand cmd1 = new SqlCommand("update_acceptance");
   SqlParameter date1 = new SqlParameter("@date",SqlDbType.DateTime);
   SqlParameter mwlink_ID1 = new SqlParameter("@mwlink_ID",SqlDbType.VarChar);
   SqlParameter matricule1 = new SqlParameter("@matricule",SqlDbType.VarChar);
   cmd1.Connection = connSQL;
   cmd1.CommandType = CommandType.StoredProcedure;

   matricule1.Value = Session["matricule"].ToString();
   cmd1.Parameters.Add(matricule1);
   
   DateTime d1 = DateTime.Today;
   string d2 = txt_Date.Text + " " + txt_heure.Text;
   try
   {
    d1 = Convert.ToDateTime(d2);
   }
   catch
   {
    lbl_erreur.Visible = true;
    txt_Date.BackColor = Color.Pink;
    lbl_erreur.Text = "Vérifiez la date, l'heure doit être de la forme HH:MM:SS";
    connSQL.Close();
    goto fin;
   }
   date1.Value = d1;
   cmd1.Parameters.Add(date1);
   mwlink_ID1.Value = ds.Tables[0].Rows[0]["mwlink_ID"].ToString();
   cmd1.Parameters.Add(mwlink_ID1);

   cmd_trans.ExecuteNonQuery();
   cmd_7.ExecuteNonQuery();
   cmd1.ExecuteNonQuery();
   fin :
   conn_trans.Close();
   connSQL.Close();
  }
 }
}

lundi 4 avril 2005 à 12:47:50 | Re : probleme d'inversement de 2 champs saisies???

Bidou

Administrateur CodeS-SourceS
Au moins y'a peu de code à regarder !



[Pub] http://www.csharpfr.com/auteurdetail.aspx?ID=13319 [\Pub]
C# forever
lundi 4 avril 2005 à 12:59:30 | Re : probleme d'inversement de 2 champs saisies???

firas_tn

merci pour ton aide bidou
lundi 4 avril 2005 à 13:14:22 | Re : probleme d'inversement de 2 champs saisies???

coq

Administrateur CodeS-SourceS
et en triple en plus...



Cocoricoooooooo !!!!
coq
MVP Visual C#
lundi 4 avril 2005 à 14:54:03 | Re : probleme d'inversement de 2 champs saisies???

Athalus

Membre Club
Bonjour,

Tu pourrais pas mettre, par exemple, que le code qui concerne tes champs qui s'inversent parce que la ...

hum.......
lundi 4 avril 2005 à 15:35:39 | Re : probleme d'inversement de 2 champs saisies???

firas_tn

bon ok j'ai mis tout ce code car je n'ai pas pu le bien comprendre mais je vais t'envoyer comme meme quelquechose:(voila ce n'est pas trés long mnt)

if (Convert.ToInt16(ds0.Tables[0].Rows[0]["T_Channel_ID"]) == 45)

{

int i1 = txt_freq_em1_site1.Text.IndexOf("Mhz");

int i2 = txt_freq_em1_site2.Text.IndexOf("Mhz");

float f1 = Convert.ToSingle(txt_freq_em1_site1.Text.Substring(0,i1).Trim());

float f2 = Convert.ToSingle(txt_freq_em1_site2.Text.Substring(0,i2).Trim());

SqlDataAdapter da5 = new SqlDataAdapter();

DataSet ds5 = new DataSet();

SqlCommand cmd5 = new SqlCommand("select_Channel_ID");

SqlParameter low_freq = new SqlParameter("@low_freq", SqlDbType.Float);

SqlParameter heigh_freq = new SqlParameter("@heigh_freq", SqlDbType.Float);

SqlParameter cn = new SqlParameter("@channel_number", SqlDbType.Int);

cmd5.Connection = connSQL;

cmd5.CommandType = CommandType.StoredProcedure;

int nbr;

nbr = txt_canal.Text.Length;

cn.Value = Convert.ToInt16(txt_canal.Text.Substring(0,nbr-1));

low_freq.Value = f1;

heigh_freq.Value = f2;

cmd5.Parameters.Add(low_freq);

cmd5.Parameters.Add(heigh_freq);

cmd5.Parameters.Add(cn);

da5.SelectCommand = cmd5;

da5.Fill(ds5);

int ch = Convert.ToInt16(ds5.Tables[0].Rows[0]["T_Channel_ID"]);

SqlDataAdapter da7 = new SqlDataAdapter();

DataSet ds7 = new DataSet();

SqlCommand cmd7 = new SqlCommand("select_link");

SqlParameter link_name7 = new SqlParameter("@link_name", SqlDbType.VarChar);

cmd7.Connection = connSQL;

cmd7.CommandType = CommandType.StoredProcedure;

link_name7.Value = list1.SelectedItem.Text;

cmd7.Parameters.Add(link_name7);

da7.SelectCommand = cmd7;

da7.Fill(ds7);

SqlCommand cmd4 = new SqlCommand("update_channel");

SqlParameter T_Channel_ID4 = new SqlParameter("@T_Channel_ID",SqlDbType.Int);

SqlParameter linkid4 = new SqlParameter("@mwlink_id",SqlDbType.VarChar);

cmd4.Connection = connSQL;

cmd4.CommandType = CommandType.StoredProcedure;

T_Channel_ID4.Value = ch;

linkid4.Value = ds7.Tables[0].Rows[0]["mwlink_id"];

cmd4.Parameters.Add(T_Channel_ID4);

cmd4.Parameters.Add(linkid4);

cmd4.ExecuteNonQuery();

}



Cette discussion est classée dans : text, items, selected, site1, site2


Répondre à ce message

Sujets en rapport avec ce message

Erreur bizarre avec remove.items de listbox [ par lagoelle ] Salut, comme je l'indique dans le titre, j'ai une erreur assez surprenante quand je click sur le lien lnkSupprDossier donc voici le code:       priva TreeView [ par Nicodelphi ] Slt à tous,J'ai une listView au j'ai tout un tas de donnée rentrer par l'utilisateur.si l'utilisateur fais un clic droit un Menucontextuel apparer et n ombre aléatoire [ par facbest ] J'ai ce petit bout de code qui ne fonctionne pas pourriez vous me dépanner très débutant , Random MyRandom = new Random();            foreach (ListVie Trouvé une chaine dans un listview [ par aurel16 ] Bonjour, Après avoir appris le vb.net, je me lance au c#. J'ai créé une listview qui contient des données. Je voudrais savoir si le texte des items c Probleme exception [ par Nicodelphi ] slt j'ai une listview avec 10 colonnes j'ai remplir 55 lignes pour la premiere colones des que je clic sur une checkbox une form s'affiche avec des do Templates Items : Groupes personnalisés [ par Bubuss ] Salut à tous,Voilà j'ai fait des templates (modèles item) et j'aurai souhaiter les organiser dans un groupe spécifique plutot que "mes modèles"Je pens lecture de ligne dans un fichier texte [ par yabiyou ] Bonjour,je suis grand débutant en C # et je n'arrrive pas à lire un fichier texte.Je voudrais stocker chaque ligne dans l'élément n°i d'un tableau pou tableau dynamique [ par adlis ] bonjour à tousvoilà j'i pour mission de créer un formulaire où on mettra dedans des données de membres qui n'auront pas besoin d'etre forcée à s'enreg Webcam et scan [ par marcgiraud ] (re)Bonjour, Voila j'ai un petit souci au niveau de mon code et je ne sais pas comment faire : Voici le code : namespace Webcam { public partia HyperTerminal pour Windows CE [ par chindji ] Bonjour! Je suis un débutant en C# et Windows CE. Actuellement je programme un HyperTerminal pour Windows CE . Mais je ne comprends pas grand chose.


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,608 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales