private void ReturneVentePeriodeAnnee(List <int> lstCentre, string Annee, string periode, bool IsRecap) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneVenteCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { if (IsRecap) { Utility.ActionDirectOrientation <ServicePrintings.CsStatFactRecap, ServiceReport.CsStatFactRecap>(res.Result, null, SessionObject.CheminImpression, "VentreRecap", "Report", true); } else { Utility.ActionDirectOrientation <ServicePrintings.CsStatFactRecap, ServiceReport.CsStatFactRecap>(res.Result, null, SessionObject.CheminImpression, "VentreStatDetail", "Report", true); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneVenteAsync(lstCentre, Annee, periode, IsRecap); service1.CloseAsync(); }
//private void MontantRegleAgent(int IdCentre, List<string> Matricule, DateTime dateDebut, DateTime dateFin) //{ // Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); // service1.MontantPaiementPreavisCompleted += (sr, res) => // { // prgBar.Visibility = System.Windows.Visibility.Collapsed; // if (res != null && res.Cancelled) // return; // if (res.Result != null && res.Result.Count != 0) // Utility.ActionDirectOrientation<ServicePrintings.CsDetailCampagne, ServiceReport.CsDetailCampagne>(res.Result, null, SessionObject.CheminImpression, "MontantRecouvrementPia", "Report", true); // else // { // Message.ShowInformation("Aucune information trouvée", "Report"); // return; // } // }; // service1.MontantPaiementPreavisAsync( Matricule, dateDebut, dateFin); // service1.CloseAsync(); //} private void ClientRemis(string CodeSite, List <int> IdAgent, DateTime dateDebut, DateTime dateFin) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneAvisReposeCompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { //Utility.ActionDirectOrientation<ServicePrintings.CsDetailCampagne, ServiceReport.CsDetailCampagne>(res.Result, null, SessionObject.CheminImpression, "ClientReposePia", "Report", true); if (chk_Recap.IsChecked == true) { Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceReport.CsDetailCampagne>(res.Result, null, string.Empty, SessionObject.CheminImpression, "Recouv_AvisRemisRecap", "Report", true, "xlsx"); } if (chk_Detail.IsChecked == true) { Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceReport.CsDetailCampagne>(res.Result, null, string.Empty, SessionObject.CheminImpression, "Recouv_AvisRemisDetail", "Report", true, "xlsx"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneAvisReposeAsync(CodeSite, IdAgent, dateDebut, dateFin); service1.CloseAsync(); }
private void TauxRecouvrement(List <int> IdCentre) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.RetourneTauxDeRecouvrementCompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionExportation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, null, string.Empty, SessionObject.CheminImpression, "TauxRecouvrement", "Report", true, "xlsx"); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.RetourneTauxDeRecouvrementAsync(IdCentre); service1.CloseAsync(); }
private void RegistreDemande(List <int> lstCentre, DateTime dateDebut, DateTime dateFin, List <string> Typedemande, List <string> Produit) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneRegistreDemande_Completed += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Dictionary <string, string> param = new Dictionary <string, string>(); Utility.ActionExportation <ServicePrintings.CsDemandeBase, ServiceReport.CsDemandeBase>(res.Result, null, string.Empty, SessionObject.CheminImpression, "RegistreDemande", "Report", true, "xlsx"); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneRegistreDemande_Async(lstCentre, dateDebut, dateFin, Typedemande, Produit); service1.CloseAsync(); }
private void ReturneTourneeParPIA(string CodeSite) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneTourneePIACompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionExportation <ServicePrintings.CsTournee, ServiceReport.CsTournee>(res.Result.Where(p => !string.IsNullOrEmpty(p.NOMRELEVEUR)).ToList(), null, string.Empty, SessionObject.CheminImpression, "Recouv_ListeDestourneePIA", "Report", true, "xlsx"); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneTourneePIAAsync(CodeSite); service1.CloseAsync(); }
private void ReturneEncaissementModePaiement(List <int> IdCentre, DateTime dateDebut, DateTime dateFin) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneEncaissementModePaiementCompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, null, SessionObject.CheminImpression, "EncaissementModePaiement", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneEncaissementModePaiementAsync(IdCentre, dateDebut, dateFin); service1.CloseAsync(); }
private void DevisValiderDansLesDelais(List <int> lstCentre, DateTime dateDebut, DateTime dateFin, List <string> Typedemande, string Produit) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneDevisTerminerDsLesDelaisCompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("pParametre", "LISTE DE DEMANDE VALIDEES DANS LES DELAIS"); Utility.ActionExportation <ServicePrintings.CsDemandeBase, ServiceReport.CsDemandeBase>(res.Result, param, string.Empty, SessionObject.CheminImpression, "Demande", "Report", true, "xlsx"); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneDevisTerminerDsLesDelaisAsync(lstCentre, dateDebut, dateFin, Typedemande, Produit); service1.CloseAsync(); }
private void NbreRetablisementAutorises(List <int> lstIdCentre, List <int> lstIdSecteur, List <int> lstIdAgent, List <int> lstIdCategorie, List <int> lstIdTournee, List <int> lstIdProduit, DateTime DateDebut, DateTime DateFin) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.RetourneNbreRetablisementAutorisesCompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; //Txt_LibelleSite.Visibility = System.Windows.Visibility.Collapsed; //btn_Site.Visibility = System.Windows.Visibility.Collapsed; //lbl_site.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("pParametre", "NOMBRE DE RETABLISSEMENTS AUTORISES"); Utility.ActionExportation <ServicePrintings.CsClient, ServiceReport.CsClient>(res.Result, param, "EtatNbreRetablisementAutorises", SessionObject.CheminImpression, "NbreRetablisementAutorises", "Report", true, OptionImpression); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.RetourneNbreRetablisementAutorisesAsync(lstIdCentre, lstIdSecteur, lstIdAgent, lstIdCategorie, lstIdTournee, lstIdProduit, DateDebut, DateFin); service1.CloseAsync(); }
private void MontantReglePia(string Matricule, DateTime dateDebut, DateTime dateFin) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.MontantPaiementPreavisCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { if (leEtatExecuter == SessionObject.MontantEncaisseControleur) { Utility.ActionDirectOrientation <ServicePrintings.CsDetailCampagne, ServiceReport.CsDetailCampagne>(res.Result, null, SessionObject.CheminImpression, "MontantPaiementGestionnaire", "Report", true); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.MontantPaiementPreavisAsync(Matricule, dateDebut, dateFin); service1.CloseAsync(); }
private void DevisValiderHorsLesDelais(List <int> lstCentre, DateTime dateDebut, DateTime dateFin, string Typedemande, string Produit) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.Protocole(), Utility.EndPoint("Report")); service1.ReturneDevisTerminerHorsDelaisCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Dictionary <string, string> param = new Dictionary <string, string>(); param.Add("pParametre", "LISTE DE DEMANDE VALIDEES HORS DELAIS"); Utility.ActionDirectOrientation <ServicePrintings.CsDemandeBase, ServiceReport.CsDemandeBase>(res.Result, param, SessionObject.CheminImpression, "Demande", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneDevisTerminerHorsDelaisAsync(lstCentre, dateDebut, dateFin, Typedemande, Produit); service1.CloseAsync(); }
private void RetourneConsoNull(Dictionary <string, List <int> > lstSiteCentre, string Periode) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneConsNullCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { string Rdlc = string.Empty; Rdlc = "ConsoNull"; List <ServiceReport.CsEvenement> LstSourceDonnee = res.Result; if (this.Chk_Recap.IsChecked == true) { Rdlc = "ConsoNullRecap"; var lstConsoNullDistinct = LstSourceDonnee.Select(k => new { k.CENTRE, k.PRODUIT }).Distinct(); List <ServiceReport.CsEvenement> lst = new List <ServiceReport.CsEvenement>(); foreach (var item in lstConsoNullDistinct) { ServiceReport.CsEvenement l = new ServiceReport.CsEvenement(); l.CENTRE = item.CENTRE; l.PRODUIT = item.PRODUIT; l.NOMBRECLIENTLOT = LstSourceDonnee.Where(i => i.CENTRE == item.CENTRE && i.PRODUIT == item.PRODUIT).ToList().Count(); lst.Add(l); } LstSourceDonnee = lst; } if (OptionImpression == SessionObject.EnvoiPrinter) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(LstSourceDonnee, param, SessionObject.CheminImpression, Rdlc, "Report", true); } else if (OptionImpression == SessionObject.EnvoiExecl) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(LstSourceDonnee, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "xlsx"); } else if (OptionImpression == SessionObject.EnvoiWord) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(LstSourceDonnee, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "doc"); } else if (OptionImpression == SessionObject.EnvoiPdf) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(LstSourceDonnee, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "pdf"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneConsNullAsync(lstSiteCentre, Periode); service1.CloseAsync(); }
private void RetourneAnnulation(List <int> lstCentre, DateTime DateDebut, DateTime DateFin) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneAnnulationFactureTopCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Dictionary <string, string> param = new Dictionary <string, string>(); //param.Add("pTop", Top.ToString()); if (Top == 1) { param.Add("pTop", "FACTURES"); } else { param.Add("pTop", "TOP 3"); } res.Result.ForEach(p => p.DENABON = (this.dtp_DateDebut.SelectedDate.Value.Year.ToString() + this.dtp_DateDebut.SelectedDate.Value.Month.ToString("00"))); if (OptionImpression == SessionObject.EnvoiPrinter) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, SessionObject.CheminImpression, "FactureAnnulation", "Report", true); } else if (OptionImpression == SessionObject.EnvoiExecl) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, "FactureAnnulation", "Report", true, "xlsx"); } else if (OptionImpression == SessionObject.EnvoiWord) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, "FactureAnnulation", "Report", true, "doc"); } else if (OptionImpression == SessionObject.EnvoiPdf) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, "FactureAnnulation", "Report", true, "pdf"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneAnnulationFactureTopAsync(lstCentre, DateDebut, DateFin, Top); service1.CloseAsync(); }
private void EtatDesCompteur() { Dictionary <string, string> param = new Dictionary <string, string>(); string centre = this.Txt_LibelleCentre.Tag == null ? string.Empty :((Galatee.Silverlight.ServiceAccueil.CsCentre) this.Txt_LibelleCentre.Tag).CODE; string produit = string.IsNullOrEmpty(this.Txt_Produit.Text) ? string.Empty : this.Txt_Produit.Tag.ToString(); int? Calibre = this.Txt_Calibre.Tag != null ? (int?)this.Txt_Calibre.Tag : null; string EtatCompteur = "1"; if (this.Chk_Disponnible.IsChecked == true && this.Chk_Attribuer.IsChecked == false) { EtatCompteur = "1"; param.Add("pParametre", "LISTE DES COMPTEURS DISPONIBLES"); } else if (this.Chk_Attribuer.IsChecked == true && this.Chk_Disponnible.IsChecked == true) { EtatCompteur = "3"; param.Add("pParametre", "ETAT DES COMPTEURS"); } else if (this.Chk_Attribuer.IsChecked == true && this.Chk_Disponnible.IsChecked == false) { EtatCompteur = "2"; param.Add("pParametre", "LISTE DES COMPTEURS ATTRIBUES"); } if (string.IsNullOrEmpty(this.Txt_LibelleCentre.Text)) { Message.ShowInformation("Veuillez selectionner le centre", "Reporting"); return; } List <string> lstCEntre = new List <string>(); lstCEntre.Add(centre); Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.Protocole(), Utility.EndPoint("Report")); service1.ReturnecompteursDisponiblesEnMagasinCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsCanalisation, ServiceReport.CsCanalisation>(res.Result, param, SessionObject.CheminImpression, "EtatCompteur", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturnecompteursDisponiblesEnMagasinAsync(lstCEntre, Calibre, produit, EtatCompteur); service1.CloseAsync(); }
private void OKButton_Click(object sender, RoutedEventArgs e) { Galatee.Silverlight.ServiceReport.ReportServiceClient service = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service.ReturneFichierPersonnelCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } Message.ShowInformation("Traitement ok", "Fichier personnel"); }; service.ReturneFichierPersonnelAsync(Shared.ClasseMEthodeGenerique.FormatPeriodeAAAAMM(this.txt_Periode.Text), SessionObject.CheminImpression); service.CloseAsync(); }
private void NombreDeJourMoyen(string CodeSite, string Periode) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneNombreMoyenDeFacturationCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { string Rdlc = string.Empty; Rdlc = "NombreMoyenDeJour"; if (OptionImpression == SessionObject.EnvoiPrinter) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, SessionObject.CheminImpression, Rdlc, "Report", true); } else if (OptionImpression == SessionObject.EnvoiExecl) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "xlsx"); } else if (OptionImpression == SessionObject.EnvoiWord) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "doc"); } else if (OptionImpression == SessionObject.EnvoiPdf) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "pdf"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneNombreMoyenDeFacturationAsync(CodeSite, Periode); service1.CloseAsync(); }
private void RetourneAnnulation(List <int> lstCentre, DateTime DateDebut, DateTime DateFin) { prgbar1.Visibility = Visibility.Visible; Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneAnnulationFactureTopCompleted += (sr, res) => { prgbar1.Visibility = Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { if (OptionImpression == SessionObject.EnvoiPrinter) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, SessionObject.CheminImpression, "FactureAnnulation", "Report", true); } else if (OptionImpression == SessionObject.EnvoiExecl) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, "FactureAnnulation", "Report", true, "xlsx"); } else if (OptionImpression == SessionObject.EnvoiWord) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, "FactureAnnulation", "Report", true, "doc"); } else if (OptionImpression == SessionObject.EnvoiPdf) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, "FactureAnnulation", "Report", true, "pdf"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneAnnulationFactureTopAsync(lstCentre, DateDebut, DateFin, Top); service1.CloseAsync(); }
private void ReturneCompteurParProduit(List <int> lstCentre, List <int> lstPoduit) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneCompteurParProduitCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { if (OptionImpression == SessionObject.EnvoiPrinter) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, SessionObject.CheminImpression, "CompteurParProduit", "Report", true); } else if (OptionImpression == SessionObject.EnvoiExecl) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, "CompteurParProduit", "Report", true, "xlsx"); } else if (OptionImpression == SessionObject.EnvoiWord) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, "CompteurParProduit", "Report", true, "doc"); } else if (OptionImpression == SessionObject.EnvoiPdf) { Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, "CompteurParProduit", "Report", true, "pdf"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneCompteurParProduitAsync(lstCentre, lstPoduit); service1.CloseAsync(); }
private void RetourneCompteurPeriode(Dictionary <string, List <int> > lesDeCentre, string Periode) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.Protocole(), Utility.EndPoint("Report")); service1.ReturneCompteurParProduitPeriodeCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, SessionObject.CheminImpression, "CompteurParProduitPeriode", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneCompteurParProduitPeriodeAsync(lesDeCentre, Periode); service1.CloseAsync(); }
private void RetourneActionFacturetaion(List <int> lstCentre, string Periode, string lotri) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneActionFacturationCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, SessionObject.CheminImpression, "ActionFacturation", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneActionFacturationAsync(lstCentre, Periode, lotri); service1.CloseAsync(); }
private void ReturneClientAucunAchat(List <int> IdCentre, DateTime dateDebut, DateTime dateFin) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneClientPrepayeJamaisAchatCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, null, SessionObject.CheminImpression, "ClientSansAchat", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneClientPrepayeJamaisAchatAsync(IdCentre, dateDebut, dateFin); service1.CloseAsync(); }
private void ListeDesTauxPaiementMandatement(string Matricule) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.RetourneTauxPaiementCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsMandatementGc, ServiceReport.CsMandatementGc>(res.Result, null, SessionObject.CheminImpression, "TauxPaiement", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.RetourneTauxPaiementAsync(Matricule); service1.CloseAsync(); }
private void EmissionParRegroupement(List <int> LstIdRegroupemt, string PeriodeDebut, string PeriodeFin) { Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneEmissionProduitRegroupementCompleted += (sr, res) => { prgBar.Visibility = Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, null, SessionObject.CheminImpression, "EmissionProduitRegroupement", "Report", true); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneEmissionProduitRegroupementAsync(LstIdRegroupemt, PeriodeDebut, PeriodeFin); service1.CloseAsync(); }
private void ChargerListeGestionnaire() { ListeGestionnaire = new List <Galatee.Silverlight.ServiceReport.CsUtilisateur>(); Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.RetourneGestionnaireCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { ListeGestionnaire = res.Result; } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.RetourneGestionnaireAsync(); service1.CloseAsync(); }
private void RetourneFactureIsole(List <int> lstIdCentre, List <int> lstIdSecteur, List <int> lstIdCategorie, List <int> lstIdProduit, DateTime?DateDebut, DateTime?DateFin) { string periode = null; if (!string.IsNullOrEmpty(this.Txt_Periode.Text)) { periode = Shared.ClasseMEthodeGenerique.FormatPeriodeAAAAMM(this.Txt_Periode.Text); } if (string.IsNullOrEmpty(this.dtp_DateDebut.Text)) { DateDebut = null; } if (string.IsNullOrEmpty(this.dtp_DateFin.Text)) { DateFin = null; } Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneFactureIsoleCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { string Rdlc = "FactureIsole"; Dictionary <string, string> param = new Dictionary <string, string>(); if (!string.IsNullOrEmpty(periode)) { param.Add("pPeriode", periode); } else { param.Add("pPeriode", ""); } if (!string.IsNullOrEmpty(this.dtp_DateDebut.Text)) { param.Add("pDebut", DateDebut.Value.ToShortDateString()); } else { param.Add("pDebut", ""); } if (!string.IsNullOrEmpty(this.dtp_DateFin.Text)) { param.Add("pFin", DateFin.Value.ToShortDateString()); } else { param.Add("pFin", ""); } if (OptionImpression == SessionObject.EnvoiPrinter) { Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, param, SessionObject.CheminImpression, Rdlc, "Report", true); } else if (OptionImpression == SessionObject.EnvoiExecl) { Utility.ActionExportation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "xlsx"); } else if (OptionImpression == SessionObject.EnvoiWord) { Utility.ActionExportation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "doc"); } else if (OptionImpression == SessionObject.EnvoiPdf) { Utility.ActionExportation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, param, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "pdf"); } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneFactureIsoleAsync(lstIdCentre, lstIdSecteur, lstIdCategorie, lstIdProduit, DateDebut, DateFin, periode); service1.CloseAsync(); }
private void EtatDesCompteur() { List <int> lstCEntre = new List <int>(); DateTime? debut = null; DateTime? fin = null; DateTime? final = null; if (dtpDateDebut.SelectedDate != null) { debut = dtpDateDebut.SelectedDate.Value; } if (dtpDateFin.SelectedDate != null) { fin = dtpDateFin.SelectedDate.Value; final = dtpDateFin.SelectedDate.Value.AddDays(1); } Dictionary <string, string> param = new Dictionary <string, string>(); int centre = 0; if (this.Txt_LibelleSite.Tag != null && this.Txt_LibelleCentre.Tag == null) { int idSite = ((int)this.Txt_LibelleSite.Tag); lstCEntre.AddRange(LstCentrePerimetre.Where(i => i.FK_IDCODESITE == idSite).Select(p => p.PK_ID).ToList()); } else if (this.Txt_LibelleCentre.Tag != null) { centre = ((Galatee.Silverlight.ServiceAccueil.CsCentre) this.Txt_LibelleCentre.Tag).PK_ID; lstCEntre.Add(centre); } string produit = string.IsNullOrEmpty(this.Txt_Produit.Text) ? string.Empty : this.Txt_Produit.Tag.ToString(); int? Calibre = this.Txt_Calibre.Tag != null ? (int?)this.Txt_Calibre.Tag : null; string EtatCompteur = "1"; if (this.Chk_Disponnible.IsChecked == true && this.Chk_Attribuer.IsChecked == false) { EtatCompteur = "1"; param.Add("pParametre", "LISTE DES COMPTEURS DISPONIBLES"); param.Add("pText", ""); } else if (this.Chk_Attribuer.IsChecked == true && this.Chk_Disponnible.IsChecked == true) { EtatCompteur = "3"; param.Add("pParametre", "ETAT DES COMPTEURS"); } else if (this.Chk_Attribuer.IsChecked == true && this.Chk_Disponnible.IsChecked == false) { EtatCompteur = "2"; param.Add("pParametre", "LISTE DES COMPTEURS ATTRIBUES"); if (debut != null && (debut.Value.Date > fin.Value.Date)) { Message.ShowInformation("La date de début ne doit pas être supérieure à la date de fin", "Reporting"); return; } if (dtpDateDebut.SelectedDate != null && dtpDateFin.SelectedDate != null) { param.Add("pText", string.Format("Compteurs liés entre le {0} et le {1}", dtpDateDebut.SelectedDate.Value.ToShortDateString(), dtpDateFin.SelectedDate.Value.ToShortDateString())); } else { param.Add("pText", ""); } } if (string.IsNullOrEmpty(this.Txt_LibelleSite.Text)) { Message.ShowInformation("Veuillez selectionner le centre", "Reporting"); return; } Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturnecompteursDisponiblesEnMagasinCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { Utility.ActionDirectOrientation <ServicePrintings.CsCanalisation, ServiceReport.CsCanalisation>(res.Result, param, SessionObject.CheminImpression, "EtatCompteur", "Report", true); Utility.ActionExportation <ServicePrintings.CsCanalisation, ServiceReport.CsCanalisation>(res.Result, param, string.Empty, SessionObject.CheminImpression, "EtatCompteur", "Report", true, "xlsx"); } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturnecompteursDisponiblesEnMagasinAsync(lstCEntre, Calibre, produit, EtatCompteur, debut, final); service1.CloseAsync(); }
private void ImpayerCategorie(Dictionary <string, List <int> > lstCentre, List <int> lstIdCategorieClient, List <int> lstIdTournee, bool IsDetail) { prgBar.Visibility = System.Windows.Visibility.Visible; Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); service1.ReturneListeDesImpayesCompleted += (sr, res) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (res != null && res.Cancelled) { return; } if (res.Result != null && res.Result.Count != 0) { string Rdlc = "ImpayeCategorieTournee"; if (btn_Site.Tag.ToString() == SessionObject.Enumere.CodeSiteScaBT || btn_Site.Tag.ToString() == SessionObject.Enumere.CodeSiteScaMT) { Rdlc = "ImpayeCategorieGCTournee"; } if (this.rdb_Detail.IsChecked == true) { Rdlc = "ImpayeCategorieDetail"; } List <ServiceReport.CsLclient> lstClient = new List <ServiceReport.CsLclient>(); var lesClient = res.Result.Select(y => new { y.CENTRE, y.CLIENT, y.ORDRE }).Distinct(); foreach (var item in lesClient) { lstClient.Add(new ServiceReport.CsLclient() { CENTRE = item.CENTRE, CLIENT = item.CLIENT, ORDRE = item.ORDRE }); } int Passage = 0; string[] tableau = new string[] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "AB", "AC", "AD", "AE", "AF", "AG", "AH" }; while (lstClient.Where(o => o.Selectionner != true).Count() != 0) { string NomFichier = Rdlc + tableau[Passage]; List <string> clientSelectionne = lstClient.Where(m => m.Selectionner != true).Take(2000).Select(o => o.CLIENT).ToList(); List <ServiceReport.CsLclient> factureAEditer = res.Result.Where(p => clientSelectionne.Contains(p.CLIENT)).ToList(); if (Chk_ExportExcel.IsChecked != true) { Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, null, SessionObject.CheminImpression, Rdlc, "Report", true); } else { Utility.ActionExportation <ServicePrintings.CsLclient, ServiceReport.CsLclient>(res.Result, null, string.Empty, SessionObject.CheminImpression, Rdlc + "Xls", "Report", true, "xlsx"); } lstClient.Where(p => clientSelectionne.Contains(p.CLIENT)).ToList().ForEach(p => p.Selectionner = true); Passage++; } } else { Message.ShowInformation("Aucune information trouvée", "Report"); return; } }; service1.ReturneListeDesImpayesAsync(lstCentre, lstIdCategorieClient, lstIdTournee, IsDetail); service1.CloseAsync(); }