private void btn_batch_Click_1(object sender, RoutedEventArgs e) { try { if (listeBatch != null) { List <CsLotri> LstLot = new List <CsLotri>(); Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>(); if (chk_LotIsole.IsChecked == true) { _LstColonneAffich.Add("NUMLOTRI", "LOT"); _LstColonneAffich.Add("PERIODE", "PERIODE"); LstLot = Facturation.ClasseMethodeGenerique.DistinctLotriPeriodeProduit(listeBatch.Where(y => y.ETATFAC10 == "O").ToList()); } else { _LstColonneAffich.Add("NUMLOTRI", "LOT"); _LstColonneAffich.Add("PERIODE", "PERIODE"); LstLot = Facturation.ClasseMethodeGenerique.DistinctLotriPeriodeProduit(listeBatch.Where(y => y.ETATFAC10 != "O").ToList()); } this.btn_batch.IsEnabled = false; List <CsLotri> _lstLotAfficher = ClasseMethodeGenerique.RetourneDistinctLotri(LstLot); List <object> obj = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_lstLotAfficher); MainView.UcListeGenerique ucg = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots"); ucg.Closed += new EventHandler(ucgReturn); ucg.Show(); } } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }
private void ChargerListeLotri(Dictionary <string, List <int> > lesDeCentre, bool IsLotCourant, string Periode) { _ListeLotri = new List <CsLotri>(); try { FacturationServiceClient service = new FacturationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Facturation")); service.ChargerLotriPourEditionIndexCompleted += (s, args) => { try { if (args.Error != null && args.Cancelled) { Message.ShowError("Erreur d'invocation du service.", "Erreur"); return; } if (args.Result == null) { Message.ShowError("Aucune donnée retournée du système.", "Erreur"); return; } _ListeLotri = args.Result; ListeDesLotriAfficher = new List <CsLotri>(); ListeDesTourneeLot = new List <CsLotri>(); this.btn_batch.IsEnabled = true; if (_ListeLotri.Count != 0) { ListeDesLotriAfficher = ClasseMethodeGenerique.RetourneDistinctLotri(_ListeLotri); ListeDesTourneeLot = ClasseMethodeGenerique.RetourneDistinctTournee(_ListeLotri); } } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; service.ChargerLotriPourEditionIndexAsync(lesDeCentre, IsLotCourant, Periode); } catch (Exception ex) { throw ex; } }
private void btn_batch_Click_1(object sender, RoutedEventArgs e) { try { if (listeBatch != null) { List <CsLotri> _lstLotAfficher = ClasseMethodeGenerique.RetourneDistinctLotri(listeBatch); Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>(); _LstColonneAffich.Add("NUMLOTRI", "LOT"); _LstColonneAffich.Add("PERIODE", "PERIODE"); List <object> obj = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_lstLotAfficher); MainView.UcListeGenerique ucg = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots"); ucg.Closed += new EventHandler(ucgReturn); ucg.Show(); } } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }