void galatee_OkClickedCentreDistinct(object sender, EventArgs e) { UcListeGenerique ctrs = sender as UcListeGenerique; if (ctrs.isOkClick) { if (ctrs.MyObjectList != null && ctrs.MyObjectList.Count != 0) { ObservableCollection <CsLotri> lstLot = (ObservableCollection <CsLotri>) this.dataGrid1.ItemsSource; ObservableCollection <CsLotri> lstLotCentre = new ObservableCollection <CsLotri>(); foreach (CsLotri item in ctrs.MyObjectList) { List <CsLotri> lstLotCentreObs = lstLot.Where(t => t.CENTRE == item.CENTRE && t.FK_IDCENTRE == item.FK_IDCENTRE).ToList(); foreach (CsLotri items in lstLotCentreObs) { lstLotCentre.Add(items); } } dataGrid1.ItemsSource = lstLotCentre; dataGrid1.Tag = lstLotCentre; } } }
void galatee_OkClicked(object sender, EventArgs e) { //UcListeDesCentres ctrs = sender as UcListeDesCentres; //this.Txt_CodeCentre.Text = ctrs.MySite.CODECENTRE; ////this.Txt_LibelleCentre.Text = ctrs.MySite.LIBELLE; //LstDeProduit = new ClasseMEthodeGenerique().RetourneListeDeProduitDuSite(ctrs.MySite); //if (LstDeProduit.Count == 1) //{ // this.Txt_CodeProduit.Text = LstDeProduit[0].CODE ; // //this.Txt_LibelleProduit.Text = LstDeProduit[0].LIBELLE; // this.btn_Produit.IsEnabled = false; //} UcListeGenerique ctrs = sender as UcListeGenerique; if (ctrs.isOkClick) { Galatee.Silverlight.ServiceAccueil.CsCentre _LeCentreClient = (Galatee.Silverlight.ServiceAccueil.CsCentre)ctrs.MyObject; //this.Txt_CodeCentre.Text = _LeCentreClient.CODECENTRE; //this.Txt_LibelleCentre.Text = _LeCentreClient.LIBELLE; //this.Txt_LibelleCentre.Tag = _LeCentreClient; } }