private void Button_Click_1(object sender, RoutedEventArgs e) { try { CsLclient leReglementSelect = (CsLclient)dtg_FactureAnnule.SelectedItem; if (leReglementSelect != null) { List <CsLclient> _lstReglement = ((List <CsLclient>)dtg_FactureAnnule.ItemsSource).Where(r => r.Selectionner == true).ToList(); Galatee.Silverlight.Caisse.FrmMotifAction ctrl = new Galatee.Silverlight.Caisse.FrmMotifAction(_lstReglement); ctrl.Closed += new EventHandler(galatee_OkClickedRaisonAnnulation); ctrl.Show(); } } catch (Exception ex) { Message.ShowError(ex, Langue.errorTitle); } }
private void galatee_OkClickedRaisonAnnulation(object sender, EventArgs e) { try { Galatee.Silverlight.Caisse.FrmMotifAction ctrs = sender as Galatee.Silverlight.Caisse.FrmMotifAction; if (ctrs.IsValide) { foreach (CsLclient item in ctrs.lstReglementAnnuler) { item.MOTIFREJET = item.MOTIFANNULATION; } List <CsLclient> _lstReglement = ((List <CsLclient>)dtg_FactureAnnule.ItemsSource).Where(r => r.Selectionner == true).ToList(); validerRejetAnnulation(ctrs.lstReglementAnnuler); } } catch (Exception ex) { throw ex; } }