//Code à copier pour les datagrids
        private void _DataGrid_KeyUp(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.Key != Key.Tab)
                {
                    ReglageDecimales reg = new ReglageDecimales();
                    switch ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString())
                    {
                        case "Qté facturée":
                            reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                            break;
                        default:
                            break;
                    }
                }
                //if ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString() == "Réf fournisseur")
                //{

                //    //MessageBox.Show("A faire");
                //    reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                //    MessageBox.Show("Fait");
                //}
            }
            catch (Exception)
            {
            }
        }
 private void _filterContainMontant_KeyUp_1(object sender, KeyEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
 }
 private void _dataGridContenuSupplementaire_KeyUp(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key != Key.Tab)
         {
             ReglageDecimales reg = new ReglageDecimales();
             switch ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString())
             {
                 case "Quantité":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "P.U.":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "P.U. Remisé":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Prix Total Remisé":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 default:
                     break;
             }
         }
     }
     catch (Exception)
     {
     }
 }
 private void _dataGridDroit_KeyUp(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key != Key.Tab)
         {
             ReglageDecimales reg = new ReglageDecimales();
             switch ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString())
             {
                 case "Quantité Livrée":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     this.RefreshDGDroit();
                     break;
                 default:
                     break;
             }
         }
     }
     catch (Exception)
     {
     }
     this.RefreshDGDroit();
 }
 private void _textBoxHeuresNormales_KeyUp_1(object sender, KeyEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
 }
 private void _DataGridTravaux_KeyUp_1(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key != Key.Tab)
         {
             ReglageDecimales reg = new ReglageDecimales();
             switch ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString())
             {
                 case "Quantite heures":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Quantite fourniture":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Prix Total fourniture":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
             }
         }
     }
     catch (Exception)
     {
     }
 }
 private void _DataGridHeureRegie_KeyUp_1(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key != Key.Tab)
         {
             ReglageDecimales reg = new ReglageDecimales();
             switch ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString())
             {
                 case "Lundi J":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Mardi J":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Mercredi J":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Jeudi J":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Vendredi J":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Samedi J":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Dimanche J":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Lundi N":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Mardi N":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Mercredi N":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Jeudi N":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Vendredi N":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Samedi N":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 case "Dimanche N":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 default:
                     break;
             }
         }
     }
     catch (Exception)
     {
     }
 }
 private void _DataGridBouteillesGaz_KeyUp_1(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key != Key.Tab)
         {
             ReglageDecimales reg = new ReglageDecimales();
             switch ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString())
             {
                 case "Quantité":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 default:
                     break;
             }
         }
     }
     catch (Exception)
     {
     }
 }
 private void _TextBoxAchatsSousTraitance_TextChanged(object sender, TextChangedEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_TextChanged((TextBox)e.OriginalSource, e);
     TextBoxVerifNumeric(sender, e);
     this.CalculMargeSousTraitance();
     this.CalculMontantAchats();
 }
 private void _TextBoxAchatsMontant_TextChanged(object sender, TextChangedEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_TextChanged((TextBox)e.OriginalSource, e);
     this.CalculMargeTotalAchatsVentes();
 }
 private void _TextBoxVirgule_KeyUp(object sender, KeyEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
 }
 private void _TextBoxVentesFourniture_TextChanged(object sender, TextChangedEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_TextChanged((TextBox)e.OriginalSource, e);
     TextBoxVerifNumeric(sender, e);
     this.CalculMargeFourniture();
     this.CalculMontantVentes();
 }
 private void _TextBoxTotalVenteHeure_TextChanged(object sender, TextChangedEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_TextChanged((TextBox)e.OriginalSource, e);
     TextBoxVerifNumeric(sender, e);
     this.CalculTauxHoraire();
     this.CalculMontantDevisNegocie();
 }
 private void _TextBoxMontantDevisNegoc_TextChanged(object sender, TextChangedEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_TextChanged((TextBox)e.OriginalSource, e);
     this.CalculRemise();
     this.CalculMontantRemise();
 }
 private void _dataGridCommandeFournisseurConditionReglement_KeyUp(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.Key != Key.Tab)
         {
             ReglageDecimales reg = new ReglageDecimales();
             switch ((((DataGridTextColumn)((DataGridCell)((TextBox)e.OriginalSource).Parent).Column)).Header.ToString())
             {
                 case "Pourcentage":
                     reg.Reglage_TextBox_KeyUp((TextBox)e.OriginalSource, e);
                     break;
                 default:
                     break;
             }
         }
     }
     catch (Exception)
     {
     }
 }
 private void _textBoxEcartTva_TextChanged_1(object sender, TextChangedEventArgs e)
 {
     ReglageDecimales reg = new ReglageDecimales();
     reg.Reglage_TextBox_TextChanged((TextBox)e.OriginalSource, e);
 }