コード例 #1
0
 public UcListeMaterielDevis(List <ObjELEMENTDEVIS> lstEltsSelect, CsRubriqueDevis laRubriqueSelect)
 {
     InitializeComponent();
     laRubrique = new CsRubriqueDevis();
     laRubrique = laRubriqueSelect;
     Devis      = SessionObject.LstDesCoutDemande.FirstOrDefault(t => t.COPER == SessionObject.Enumere.CoperTRV);
     if (Devis != null)
     {
         taxe = SessionObject.LstDesTaxe.FirstOrDefault(t => t.PK_ID == Devis.FK_IDTAXE);
     }
     lstElementDevis = lstEltsSelect;
     lstEltsSelect.ForEach(t => t.FK_IDMATERIELDEVIS = t.PK_ID);
     RemplirListe(lstEltsSelect);
 }
コード例 #2
0
 private void Btn_Ajouter_Click(object sender, RoutedEventArgs e)
 {
     if (dataGridRubriqueDevis.SelectedItem != null)
     {
         CsRubriqueDevis        laRubriqueSelect = (CsRubriqueDevis)dataGridRubriqueDevis.SelectedItem;
         List <ObjELEMENTDEVIS> _LstEltDevis     = Shared.ClasseMEthodeGenerique.RetourneListCopy <ObjELEMENTDEVIS>(ListeFourniture.Where(t => t.ISGENERE == false).ToList());
         UcListeMaterielDevis   ctrt             = new UcListeMaterielDevis(_LstEltDevis, laRubriqueSelect);
         ctrt.Closed += ctrt_Closed;
         ctrt.Show();
     }
     else
     {
         Message.ShowInformation("Sélectionnez une rubrique", "");
     }
 }
コード例 #3
0
        private void dgMyDataGrid_MouseLeftButtonUp1(object sender, MouseButtonEventArgs e)
        {
            DataGrid dg         = (sender as DataGrid);
            var      allObjects = dg.ItemsSource as List <CsRubriqueDevis>;

            if (dg.SelectedItem != null)
            {
                foreach (CsRubriqueDevis item in allObjects)
                {
                    item.IsSelect = false;
                }

                CsRubriqueDevis SelectedObject = (CsRubriqueDevis)dg.SelectedItem;
                if (SelectedObject.IsSelect == false)
                {
                    SelectedObject.IsSelect = true;
                }
                else
                {
                    SelectedObject.IsSelect = false;
                }
            }
        }