Exemple #1
0
        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 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();
        }
Exemple #3
0
        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 Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null && (lstSource != null && lstSource.Count != 0))
     {
         Utility.ActionExportation <ServicePrintings.CsDetailMoratoire, ServiceRecouvrement.CsDetailMoratoire>(dataTable, null, string.Empty, SessionObject.CheminImpression, "SuivieMoratoire", "Recouvrement", true, "xlsx");
     }
 }
        private void TauxEncaissement(List <int> IdCentre)
        {
            Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report"));
            service1.RetourneTauxDeEncaissementCompleted += (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, "TauxEncaissement", "Report", true, "xlsx");
                }
                else
                {
                    Message.ShowInformation("Aucune information trouvée", "Report");
                    return;
                }
            };
            service1.RetourneTauxDeEncaissementAsync(IdCentre);
            service1.CloseAsync();
        }
Exemple #6
0
        private void AvanceSurConsomation(string CodeSite, bool IsResilier, DateTime?DateDebut, DateTime?DateFin)
        {
            Galatee.Silverlight.ServiceInterfaceComptable.InterfaceComptableServiceClient service1 = new ServiceInterfaceComptable.InterfaceComptableServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("InterfaceComptable"));
            service1.RetourneAvanceSurConsomationCompleted += (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, ServiceInterfaceComptable.CsLclient>(res.Result, null, string.Empty, SessionObject.CheminImpression, "AvanceSurConsomation", "InterfaceComptable", true, "xlsx");
                }

                else
                {
                    Message.ShowInformation("Aucune information trouvée", "Report");
                    return;
                }
            };
            service1.RetourneAvanceSurConsomationAsync(CodeSite, IsResilier, DateDebut, DateFin);
            service1.CloseAsync();
        }
        void ctrl_Closed(object sender, EventArgs e)
        {
            this.IsEnabled = true;
            Galatee.Silverlight.Shared.FrmOptionEditon ctrs = sender as Galatee.Silverlight.Shared.FrmOptionEditon;
            if (ctrs.IsOptionChoisi)
            {
                lstClientImprimer.ForEach(t => t.ISINVITATIONEDITER = true);
                MiseAJoursDetailCampagne(lstClientImprimer);

                if (ctrs.OptionSelect == SessionObject.EnvoiPrinter)
                {
                    Utility.ActionDirectOrientation <ServicePrintings.CsDetailCampagnePrecontentieux, ServiceRecouvrement.CsDetailCampagnePrecontentieux>(lstClientImprimer, null, SessionObject.CheminImpression, "LettreInvitation", "Precontentieux", true);
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsDetailCampagnePrecontentieux, ServiceRecouvrement.CsDetailCampagnePrecontentieux>(lstClientImprimer, null, string.Empty, SessionObject.CheminImpression, "LettreInvitation", "Precontentieux", true, "xlsx");
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiWord)
                {
                    Utility.ActionExportation <ServicePrintings.CsDetailCampagnePrecontentieux, ServiceRecouvrement.CsDetailCampagnePrecontentieux>(lstClientImprimer, null, string.Empty, SessionObject.CheminImpression, "LettreInvitation", "Precontentieux", true, "doc");
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsDetailCampagnePrecontentieux, ServiceRecouvrement.CsDetailCampagnePrecontentieux>(lstClientImprimer, null, string.Empty, SessionObject.CheminImpression, "LettreInvitation", "Precontentieux", true, "pdf");
                }
            }
        }
        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();
        }
        void ctrl_Closed(object sender, EventArgs e)
        {
            this.IsEnabled = true;
            Galatee.Silverlight.Shared.FrmOptionEditon ctrs = sender as Galatee.Silverlight.Shared.FrmOptionEditon;
            if (ctrs.IsOptionChoisi)
            {
                if (ctrs.OptionSelect == SessionObject.EnvoiPrinter)
                {
                    Utility.ActionDirectOrientation <ServicePrintings.CsConsommateur, ServiceParametrage.CsConsommateur>(lstDonnee, param, SessionObject.CheminImpression, "Consommateur", "Parametrage", true);
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsConsommateur, ServiceParametrage.CsConsommateur>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, "Consommateur", "Parametrage", true, "xlsx");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiWord)
                {
                    Utility.ActionExportation <ServicePrintings.CsConsommateur, ServiceParametrage.CsConsommateur>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, "Consommateur", "Parametrage", true, "doc");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsConsommateur, ServiceParametrage.CsConsommateur>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, "Consommateur", "Parametrage", true, "pdf");
                }
            }
        }
Exemple #10
0
        void ctrl_Closed(object sender, EventArgs e)
        {
            this.IsEnabled = true;
            Galatee.Silverlight.Shared.FrmOptionEditon ctrs = sender as Galatee.Silverlight.Shared.FrmOptionEditon;
            if (ctrs.IsOptionChoisi)
            {
                if (ctrs.OptionSelect == SessionObject.EnvoiPrinter)
                {
                    Utility.ActionDirectOrientation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(lstHisto, param, SessionObject.CheminImpression, "ReportConnectionUser", "Administration", true);
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(lstHisto, param, string.Empty, SessionObject.CheminImpression, "ReportConnectionUser", "Administration", true, "xlsx");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiWord)
                {
                    Utility.ActionExportation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(lstHisto, param, string.Empty, SessionObject.CheminImpression, "ReportConnectionUser", "Administration", true, "doc");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(lstHisto, param, string.Empty, SessionObject.CheminImpression, "ReportConnectionUser", "Administration", true, "pdf");
                }
            }
        }
        private void ExportFile_Click_1(object sender, RoutedEventArgs e)
        {
            Dictionary <string, string> param = new Dictionary <string, string>();
            string key = Utility.getKey();

            Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(dataTable, null, string.Empty, SessionObject.CheminImpression, "Campagnes", "Recouvrement", true, "xlsx");
        }
        void ctrl_Closed(object sender, EventArgs e)
        {
            this.IsEnabled = true;
            Galatee.Silverlight.Shared.FrmOptionEditon ctrs = sender as Galatee.Silverlight.Shared.FrmOptionEditon;
            if (ctrs.IsOptionChoisi)
            {
                if (ctrs.OptionSelect == SessionObject.EnvoiPrinter)
                {
                    Utility.ActionDirectOrientation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(lstAImprimer, null, SessionObject.CheminImpression, "ReportHabillitationMenu", "Administration", false);
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(lstAImprimer, null, string.Empty, SessionObject.CheminImpression, "ReportHabillitationMenu", "Administration", true, "xlsx");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiWord)
                {
                    Utility.ActionExportation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(lstAImprimer, null, string.Empty, SessionObject.CheminImpression, "ReportHabillitationMenu", "Administration", true, "doc");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(lstAImprimer, null, string.Empty, SessionObject.CheminImpression, "ReportHabillitationMenu", "Administration", true, "pdf");
                }
            }
        }
Exemple #13
0
        //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 btnAfficher_Copy2_Click_1(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null)
     {
         List <ServiceRecouvrement.CsDetailCampagne> dataTable = (List <ServiceRecouvrement.CsDetailCampagne>)lvwResultat.ItemsSource;
         Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(dataTable, null, string.Empty, SessionObject.CheminImpression, "ChequeImpaye", "Recouvrement", true, "xlsx");
     }
 }
 private void ExportFile_Click_1(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null)
     {
         List <CsDetailCampagne> ligne = ((ObservableCollection <CsDetailCampagne>)lvwResultat.ItemsSource).ToList();
         Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(ligne, null, string.Empty, SessionObject.CheminImpression, "ClientRelancer", "Recouvrement", true, "xlsx");
     }
 }
 private void btn_Exporter_Click_1(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null)
     {
         List <CsDetailCampagne> lstSource = (List <CsDetailCampagne>) this.lvwResultat.ItemsSource;
         Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(lstSource, null, string.Empty, SessionObject.CheminImpression, "CampagnePoser", "Recouvrement", true, "xlsx");
     }
 }
Exemple #17
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null)
     {
         List <CsDetailCampagne> lstDonnees = (List <CsDetailCampagne>)lvwResultat.ItemsSource;
         Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(lstDonnees, null, string.Empty, SessionObject.CheminImpression, "MauvaisPayeurs", "Recouvrement", true, "xlsx");
     }
 }
Exemple #18
0
        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 ExportFile_Click_1(object sender, RoutedEventArgs e)
        {
            Dictionary <string, string> param = new Dictionary <string, string>();
            string key = Utility.getKey();

            List <CsDetailCampagne> lstClientEnRendezVous = lesClientCampagne.Where(t => t.IsSelect == true).ToList();

            if (lstClientEnRendezVous == null || lstClientEnRendezVous.Count == 0)
            {
                return;
            }
            Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(lstClientEnRendezVous, null, string.Empty, SessionObject.CheminImpression, "ClientResilier", "Recouvrement", true, "xlsx");
        }
Exemple #21
0
        private void RetourneCompteurPeriode(Dictionary <string, List <int> > lesDeCentre, string Periode, bool IsStat)
        {
            prgBar.Visibility = System.Windows.Visibility.Visible;

            Galatee.Silverlight.ServiceReport.ReportServiceClient service1 = new Galatee.Silverlight.ServiceReport.ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report"));
            service1.ReturneCompteurParProduitPeriodeCompleted += (sr, res) =>
            {
                prgBar.Visibility = System.Windows.Visibility.Collapsed;

                if (res != null && res.Cancelled)
                {
                    return;
                }

                if (res.Result != null && res.Result.Count != 0)
                {
                    string Rdlc = "CompteurParProduitPeriode";
                    if (IsStat)
                    {
                        Rdlc = "CompteurParProduitPeriodeStat";
                    }

                    if (OptionImpression == SessionObject.EnvoiPrinter)
                    {
                        Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, SessionObject.CheminImpression, Rdlc, "Report", true);
                    }
                    else if (OptionImpression == SessionObject.EnvoiExecl)
                    {
                        Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "xlsx");
                    }

                    else if (OptionImpression == SessionObject.EnvoiWord)
                    {
                        Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "doc");
                    }

                    else if (OptionImpression == SessionObject.EnvoiPdf)
                    {
                        Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceReport.CsEvenement>(res.Result, null, string.Empty, SessionObject.CheminImpression, Rdlc, "Report", true, "pdf");
                    }
                }
                else
                {
                    Message.ShowInformation("Aucune information trouvée", "Report");
                    return;
                }
            };
            service1.ReturneCompteurParProduitPeriodeAsync(lesDeCentre, Periode, IsStat);
            service1.CloseAsync();
        }
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (lvwResultat.ItemsSource != null)
         {
             List <CsDetailCampagne> lstSource = (List <CsDetailCampagne>) this.lvwResultat.ItemsSource;
             Utility.ActionExportation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(lstSource, null, string.Empty, SessionObject.CheminImpression, "CampagnePoser", "Recouvrement", true, "xlsx");
         }
     }
     catch (Exception ex)
     {
         this.OKButton.IsEnabled = true;
         Message.ShowError(ex, Galatee.Silverlight.Resources.Langue.errorTitle);
     }
 }
 public void RetourneBalanceAgee(string CodeSite, DateTime?dateFin)
 {
     try
     {
         Galatee.Silverlight.ServiceInterfaceComptable.InterfaceComptableServiceClient service = new Galatee.Silverlight.ServiceInterfaceComptable.InterfaceComptableServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("InterfaceComptable"));
         service.RetourneBalanceAgeeCompleted += (s, args) =>
         {
             try
             {
                 prgBar.Visibility = System.Windows.Visibility.Collapsed;
                 if (args.Cancelled || args.Error != null || args.Result == null)
                 {
                     string error = args.Error.InnerException.ToString();
                     return;
                 }
                 else
                 {
                     if (args.Result != null && args.Result.Count != 0)
                     {
                         if (chk_Excel.IsChecked == true)
                         {
                             Utility.ActionExportation <ServicePrintings.CsBalance, ServiceInterfaceComptable.CsBalance>(args.Result, param, string.Empty, SessionObject.CheminImpression, "BalanceAgee", "InterfaceComptable", true, "xlsx");
                         }
                         else
                         {
                             Utility.ActionDirectOrientation <ServicePrintings.CsBalance, ServiceInterfaceComptable.CsBalance>(args.Result, param, SessionObject.CheminImpression, "BalanceAgee", "InterfaceComptable", false);
                         }
                     }
                     else
                     {
                         Message.ShowInformation("Aucune donnée trouvée ", "Balance");
                     }
                 }
             }
             catch (Exception ex)
             {
                 Message.ShowError(ex, Galatee.Silverlight.Resources.Caisse.Langue.errorTitle);
             }
         };
         service.RetourneBalanceAgeeAsync(CodeSite, dateFin);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        void ctrl_Closed(object sender, EventArgs e)
        {
            this.IsEnabled = true;
            string EtatRdrl = "";

            Galatee.Silverlight.Shared.FrmOptionEditon ctrs = sender as Galatee.Silverlight.Shared.FrmOptionEditon;
            if (ctrs.IsOptionChoisi)
            {
                if (leEtatExecuter == SessionObject.AbonneNonConstituer)
                {
                    EtatRdrl = "AbonneNonConstituer";
                }
                if (leEtatExecuter == SessionObject.AbonneNonSaisie)
                {
                    EtatRdrl = "AbonneNonSaisi";
                }
                if (leEtatExecuter == SessionObject.AbonneSaisieNonFact)
                {
                    EtatRdrl = "AbonneNonCalcules";
                }
                if (leEtatExecuter == SessionObject.AbonneFactureNonMaj)
                {
                    EtatRdrl = "AbonneNonMaj";
                }

                if (ctrs.OptionSelect == SessionObject.EnvoiPrinter)
                {
                    Utility.ActionDirectOrientation <ServicePrintings.CsEvenement, ServiceFacturation.CsEvenement>(lstDonnee, param, SessionObject.CheminImpression, EtatRdrl, "Report", true);
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceFacturation.CsEvenement>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, EtatRdrl, "Report", true, "xlsx");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiWord)
                {
                    Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceFacturation.CsEvenement>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, EtatRdrl, "Report", true, "doc");
                }

                else if (ctrs.OptionSelect == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsEvenement, ServiceFacturation.CsEvenement>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, EtatRdrl, "Report", true, "pdf");
                }
            }
        }
        private void RetourneHistoriquePassWordClient(List <int?> idClient)
        {
            Dictionary <string, string> param = new Dictionary <string, string>();

            param.Add("pNomConnection", string.Empty);

            string key = Utility.getKey();
            AdministrationServiceClient client = new AdministrationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Administration"));

            client.RetourneHistoriquePasswordFromListUserCompleted += (ss, res) =>
            {
                if (res.Cancelled || res.Error != null)
                {
                    string error = res.Error.Message;
                    Message.ShowError(error, Galatee.Silverlight.Resources.Langue.errorTitle);
                    return;
                }
                if (res.Result == null)
                {
                    Message.ShowInformation(Galatee.Silverlight.Resources.Langue.msgNodata, Galatee.Silverlight.Resources.Langue.informationTitle);
                    return;
                }
                //Utility.ActionDirectOrientation<ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(res.Result, null, SessionObject.CheminImpression, "ReportPasswordUser", "Administration", true);

                if (Option == SessionObject.EnvoiPrinter)
                {
                    Utility.ActionDirectOrientation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(res.Result, null, SessionObject.CheminImpression, "ReportPasswordUser", "Administration", true);
                }
                else if (Option == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(res.Result, null, string.Empty, SessionObject.CheminImpression, "ReportPasswordUser", "Administration", true, "xlsx");
                }

                else if (Option == SessionObject.EnvoiWord)
                {
                    Utility.ActionExportation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(res.Result, null, string.Empty, SessionObject.CheminImpression, "ReportPasswordUser", "Administration", true, "doc");
                }

                else if (Option == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsHistoriquePassword, ServiceAdministration.CsHistoriquePassword>(res.Result, null, string.Empty, SessionObject.CheminImpression, "ReportPasswordUser", "Administration", true, "pdf");
                }
            };
            client.RetourneHistoriquePasswordFromListUserAsync(idClient);
        }
        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 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 RetourneHabilitationUser(List <int> ListidClient)
        {
            string key = Utility.getKey();
            AdministrationServiceClient client = new AdministrationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Administration"));

            client.RetourneProfilUtilisateurCompleted += (ss, res) =>
            {
                if (res.Cancelled || res.Error != null)
                {
                    string error = res.Error.Message;
                    Message.ShowError(error, Galatee.Silverlight.Resources.Langue.errorTitle);
                    return;
                }
                if (res.Result == null)
                {
                    Message.ShowInformation(Galatee.Silverlight.Resources.Langue.msgNodata, Galatee.Silverlight.Resources.Langue.informationTitle);
                    return;
                }
                //Utility.ActionDirectOrientation<ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(res.Result, null, SessionObject.CheminImpression, "ReportHabillitationMenuUser", "Administration", true);

                if (Option == SessionObject.EnvoiPrinter)
                {
                    Utility.ActionDirectOrientation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(res.Result, null, SessionObject.CheminImpression, "ReportHabillitationMenuUser", "Administration", true);
                }
                else if (Option == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(res.Result, null, string.Empty, SessionObject.CheminImpression, "ReportHabillitationMenuUser", "Administration", true, "xlsx");
                }

                else if (Option == SessionObject.EnvoiWord)
                {
                    Utility.ActionExportation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(res.Result, null, string.Empty, SessionObject.CheminImpression, "ReportHabillitationMenuUser", "Administration", true, "doc");
                }

                else if (Option == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(res.Result, null, string.Empty, SessionObject.CheminImpression, "ReportHabillitationMenuUser", "Administration", true, "pdf");
                }
            };
            client.RetourneProfilUtilisateurAsync(lstUtilisateur.Select(u => u.PK_ID).ToList(), key);
        }
Exemple #29
0
 private void EditButton_Click(object sender, RoutedEventArgs e)
 {
     if (this.TBOperationClient.IsSelected)
     {
         if (DTOperationClientele.ItemsSource != null)
         {
             List <CsComptabilisation> lstComptabilisation = (List <CsComptabilisation>) this.DTOperationClientele.ItemsSource;
             Utility.ActionExportation <ServicePrintings.CsComptabilisation, ServiceInterfaceComptable.CsComptabilisation>(lstComptabilisation, null, string.Empty, SessionObject.CheminImpression, "Operation", "InterfaceComptable", true, "xlsx");
             Utility.ActionDirectOrientation <ServicePrintings.CsComptabilisation, ServiceInterfaceComptable.CsComptabilisation>(lstComptabilisation, null, SessionObject.CheminImpression, "Operation", "InterfaceComptable", true);
         }
     }
     else
     {
         if (DTEcritureComptableFacture.ItemsSource != null)
         {
             List <CsEcritureComptable> lstComptabilisation = (List <CsEcritureComptable>) this.DTEcritureComptableFacture.ItemsSource;
             Utility.ActionDirectOrientation <ServicePrintings.CsEcritureComptable, ServiceInterfaceComptable.CsEcritureComptable>(lstComptabilisation, null, SessionObject.CheminImpression, "Comptabilisation", "InterfaceComptable", true);
             Utility.ActionExportation <ServicePrintings.CsEcritureComptable, ServiceInterfaceComptable.CsEcritureComptable>(lstComptabilisation, null, string.Empty, SessionObject.CheminImpression, "Comptabilisation", "InterfaceComptable", true, "xlsx");
         }
     }
 }
        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();
        }