private void Txt_DateAbonnement_TextChanged(object sender, TextChangedEventArgs e)
 {
     try
     {
         if (this.Txt_DateAbonnement.Text.Length == SessionObject.Enumere.TailleDate)
         {
             if (ClasseMEthodeGenerique.IsDateValide(this.Txt_DateAbonnement.Text) == null)
             {
                 var w = new MessageBoxControl.MessageBoxChildWindow(Langue.lbl_Menu, "Date invalide", MessageBoxControl.MessageBoxButtons.Ok, MessageBoxControl.MessageBoxIcon.Information);
                 w.OnMessageBoxClosed += (_, result) =>
                 {
                     this.Txt_DateAbonnement.Focus();
                 };
                 w.Show();
             }
             else
             {
                 if (typeDemande != SessionObject.Enumere.ModificationAbonnement)
                 {
                     EnregistrerDemande(LaDemande);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Langue.lbl_Menu);
     }
 }
 private void Txt_DateEvt_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (this.Txt_DateEvt.Text.Length == SessionObject.Enumere.TailleDate)
     {
         if (ClasseMEthodeGenerique.IsDateValide(this.Txt_DateEvt.Text) == null)
         {
             DialogResult dialogue = new DialogResult("Date invalide", "Saisie date", false, true, false);
             dialogue.Closed += new EventHandler(dialogue_Closed);
             dialogue.Show();
         }
     }
 }
示例#3
0
 private void Txt_DateDepose_LostFocus(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(Txt_DateDepose.Text))
     {
         if (ClasseMEthodeGenerique.IsDateValide(Txt_DateDepose.Text) == null)
         {
             Message.ShowInformation(Langue.MsgDateInvalide, Langue.lbl_Menu);
             this.Txt_DateDepose.Focus();
             return;
         }
     }
 }
示例#4
0
 private void Txt_DateRacordement_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (this.Txt_DateRacordement.Text.Length == SessionObject.Enumere.TailleDate)
     {
         if (ClasseMEthodeGenerique.IsDateValide(this.Txt_DateRacordement.Text) == null)
         {
             var w = new MessageBoxControl.MessageBoxChildWindow(Langue.lbl_Menu, "Date invalide", MessageBoxControl.MessageBoxButtons.Ok, MessageBoxControl.MessageBoxIcon.Information);
             w.OnMessageBoxClosed += (_, result) =>
             {
                 this.Txt_DateRacordement.Focus();
             };
             w.Show();
         }
     }
 }