Exemplo n.º 1
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.º 2
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 ();
            }
        }