Beispiel #1
0
 void galatee_OkclikcCreation(object sender, EventArgs e)
 {
     try
     {
         UcGererReleveurs rel = sender as UcGererReleveurs;
         if (rel.IsOkClick)
         {
             if (!ListeReleveurActif.Select(r => r.MATRICULE).Contains(rel._releveurCreation.MATRICULE))
             {
                 ListeReleveur.Add(rel._releveurCreation);
                 Txt_Centre.Text = rel._releveurCreation.CENTRE;
                 Txt_Centre_TextChanged(null, null);
                 if (ListeReleveur != null && ListeReleveur.Count != 0)
                 {
                     this.dataGrid1.ItemsSource = null;
                     this.dataGrid1.ItemsSource = ListeReleveur.Where(t => t.FK_IDCENTRE == rel._releveurCreation.FK_IDCENTRE && (t.SUPPRIMER == null || t.SUPPRIMER == false));
                 }
             }
             else
             {
                 Message.ShowWarning("Ce réléveur est déja actif sur ce cente", "Alert");
             }
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
 void galatee_OkclikcModification(object sender, EventArgs e)
 {
     try
     {
         UcGererReleveurs rel = sender as UcGererReleveurs;
         //Txt_Centre.Text = ListeReleveur.First().CENTRE;
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
Beispiel #3
0
 private void btn_Creation_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         UcGererReleveurs u = new UcGererReleveurs(lstSite, lesCentre, ListeUtilisateurReleveur, ListeReleveur, false);
         u.Closed += new EventHandler(galatee_OkclikcCreation);
         u.Show();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
Beispiel #4
0
 private void btn_modification_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (dataGrid1.SelectedItem == null)
         {
             return;
         }
         CsReleveur       releveur = (CsReleveur)dataGrid1.SelectedItem;
         UcGererReleveurs u        = new UcGererReleveurs(lstSite, lesCentre, ListeReleveur, releveur, true);
         u.Closed += new EventHandler(galatee_OkclikcModification);
         u.Show();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }