private void ChargerAction(Galatee.Silverlight.ServiceFacturation.CsLotri _leLotri) { try { Galatee.Silverlight.ServiceFacturation.FacturationServiceClient service = new Galatee.Silverlight.ServiceFacturation.FacturationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Facturation")); service.retourneActionFactCompleted += (s, args) => { try { if (args != null && args.Cancelled) { Message.ShowError(args.Error, Galatee.Silverlight.Resources.Index.Langue.libelleModule); return; } if (args.Result == null || args.Result.Count == 0) { Message.ShowError(Galatee.Silverlight.Resources.Index.Langue.Msg_IndexNonTrouvé, Galatee.Silverlight.Resources.Index.Langue.libelleModule); return; } this.dtg_Action.ItemsSource = null; this.dtg_Action.ItemsSource = args.Result; } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; service.retourneActionFactAsync(_leLotri); } catch (Exception ex) { throw ex; } }
private void btn_Rechercher_Click(object sender, RoutedEventArgs e) { List <Galatee.Silverlight.ServiceFacturation.CsLotri> _lstLotSelect = new List <Galatee.Silverlight.ServiceFacturation.CsLotri>(); Galatee.Silverlight.ServiceFacturation.CsLotri _leCritere = new Galatee.Silverlight.ServiceFacturation.CsLotri(); if (this.Txt_NumBatch.Tag != null) { _leCritere.NUMLOTRI = ((CsLotri)this.Txt_NumBatch.Tag).NUMLOTRI; } ChargerAction(_leCritere); }
private void btn_Rechercher_Click(object sender, RoutedEventArgs e) { List <Galatee.Silverlight.ServiceFacturation.CsLotri> _lstLotSelect = new List <Galatee.Silverlight.ServiceFacturation.CsLotri>(); Galatee.Silverlight.ServiceFacturation.CsLotri _leCritere = new Galatee.Silverlight.ServiceFacturation.CsLotri(); if (this.Txt_NumBatch.Tag != null) { _leCritere.NUMLOTRI = ((CsLotri)this.Txt_NumBatch.Tag).NUMLOTRI; } List <int> lstIdCentre = listeBatch.Where(t => t.NUMLOTRI == _leCritere.NUMLOTRI).Select(t => t.FK_IDCENTRE).ToList(); ChargerAction(_leCritere, lstIdCentre); }