public void PopulateComboBox()
        {
            try{

                RetourRechercheClient retour = new RetourRechercheClient ();
                DataSet clients = retour.PopulateClient ();

            for (int i = 0; i < clients.Tables [0].Rows.Count; i++)
            {
                StringBuilder sb = new StringBuilder ();
                sb.Append ("ID " + clients.Tables [0].Rows [0] [0].ToString () + " ");
                sb.Append (clients.Tables [0].Rows [0] [1].ToString () + " ");
                sb.Append (clients.Tables [0].Rows [0] [2].ToString () + " ");
                sb.Append (clients.Tables [0].Rows [0] [3].ToString () + ",");
                sb.Append (clients.Tables [0].Rows [0] [4].ToString () + ", ");
                sb.Append (clients.Tables [0].Rows [0] [5].ToString () + " ");
                sb.Append (clients.Tables [0].Rows [0] [6].ToString () + " ");
                sb.Append (clients.Tables [0].Rows [0] [7].ToString () + " ");

                clientBox.InsertText (i, sb.ToString ());

            }
            }catch(Exception ex){
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Pour selectionner le client pour le dossier client.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 protected void OnClientSelectionneClicked(object sender, EventArgs e)
 {
     try{
         int selectionne = clientBox.Active;
         RetourRechercheClient.InfoClientSelectionne = iDClient [selectionne];
         RetourRechercheClient.Telephone = ClientPhone [selectionne];
         RetourRechercheClient recherche = new RetourRechercheClient ();
         recherche.Show ();
         this.Destroy ();
     }catch(Exception ex){
         MessageDialog ms = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok,
             ex.Message);
         ms.Run();
         ms.Destroy();
     }
 }
Exemplo n.º 3
0
        protected void OnChercheButtonClicked(object sender, EventArgs e)
        {
            string telephone = noDeTelephoneEntry.Text;

            bool valide = ValiderNoDeTel (telephone);
            if ((telephone.Length == 14 || telephone.Length == 10) && valide == true) {
                RetourRechercheClient rrc = new RetourRechercheClient ();
                rrc.Show ();
                this.Destroy ();
            } else
            {
                MessageDialog ms = new MessageDialog (this, DialogFlags.Modal, MessageType.Error
                    , ButtonsType.Ok, "Vous avez mal inscrit le numéro de téléphone");
                ms.Run ();
                ms.Destroy ();
            }
        }