private void EditionSortieMateriel(List <int> demandes)
        {
            try
            {
                //Lancer la transaction de Mise à jour en base
                AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                service1.RetourneElementDEvisFromIdDemandeCompleted += (sr, res) =>
                {
                    if (res != null && res.Cancelled)
                    {
                        return;
                    }
                    res.Result.ForEach(t => t.NUMFOURNITURE = LeProgramme.LIBELLEEQUIPE);
                    res.Result.ForEach(t => t.QUANTITERECAP = this.txt_LibelleAgentLivreur.Text);
                    res.Result.ForEach(t => t.MontantRecap  = this.txt_LibelleAgentRecepteur.Text);

                    res.Result.ForEach(t => t.COMMUNE          = LeProgramme.LIBELLEEQUIPE);
                    res.Result.ForEach(t => t.NUMDEVIS         = LeProgramme.DATEPROGRAMME.Value.ToShortDateString());
                    res.Result.ForEach(t => t.USERMODIFICATION = LeProgramme.NUMPROGRAMME);

                    Utility.ActionDirectOrientation <ServicePrintings.ObjELEMENTDEVIS, ObjELEMENTDEVIS>(res.Result, null, SessionObject.CheminImpression, "SortieMateriel", "Devis", true);
                };
                service1.RetourneElementDEvisFromIdDemandeAsync(demandes);
                service1.CloseAsync();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        private void ValiderChoix(List <CsCanalisation> lstdemande, List <ObjELEMENTDEVIS> lesObjetDevis, List <CsDemande> Lstdemande, List <int> Listid, List <CsDemande> LstdemandeRejet, List <int> ListidRejet)
        {
            ServiceWorkflow.WorkflowClient clientWkf = new ServiceWorkflow.WorkflowClient(Utility.Protocole(), Utility.EndPoint("Workflow"));
            lstAutreMateriel = new List <CsSortieAutreMateriel>();

            AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));

            service1.InsertSortieMaterielCompleted += (sr, res2) =>
            {
                if (res2 != null && res2.Cancelled)
                {
                    return;
                }
                if (string.IsNullOrEmpty(res2.Result))
                {
                    Message.ShowInformation("Sortie matériel effectuée", Langue.lbl_Menu);
                    EnvoyerDemandeEtapeSuivante(lstdemande.Select(d => d.FK_IDDEMANDE.Value).ToList(), clientWkf, service1);
                    List <ObjELEMENTDEVIS> lesElemtEditer = lesObjetDevis;
                    lesElemtEditer.ForEach(t => t.NUMDEVIS      = this.dtProgram.SelectedDate.Value.ToShortDateString());
                    lesElemtEditer.ForEach(t => t.NUMFOURNITURE = ((CsGroupe)this.cboEquipe.SelectedItem).LIBELLE);
                    lesElemtEditer.ForEach(t => t.QUANTITERECAP = this.txt_LibelleAgentLivreur.Text);
                    lesElemtEditer.ForEach(t => t.MontantRecap  = this.txt_LibelleAgentRecepteur.Text);
                    Utility.ActionDirectOrientation <ServicePrintings.ObjELEMENTDEVIS, ObjELEMENTDEVIS>(lesElemtEditer, null, SessionObject.CheminImpression, "SortieMateriel", "Devis", true);
                }
                else
                {
                    Message.ShowError("Sortie compteur échouée", Langue.lbl_Menu);
                    return;
                }
            };
            service1.InsertSortieMaterielAsync((int)this.txtAgt_Livreur.Tag, (int)this.txtAgt_Recepteur.Tag, EtapeActuelle, LstDemandeValide, true);
            service1.CloseAsync();
        }
        private void EditerProgrammation(string NumeroProgramme)
        {
            try
            {
                List <int> demandes    = ((List <CsDemandeBase>)dgDemandeAffecte.ItemsSource).Select(d => d.PK_ID).ToList <int>();
                string     TypeDemande = ((List <CsDemandeBase>)dgDemandeAffecte.ItemsSource).ToList().FirstOrDefault().LIBELLETYPEDEMANDE;
                //Lancer la transaction de Mise à jour en base
                AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                service1.RetourneElementDEvisFromIdDemandeCompleted += (sr, res) =>
                {
                    if (res != null && res.Cancelled)
                    {
                        return;
                    }

                    res.Result.ForEach(t => t.NUMFOURNITURE      = ((CsGroupe)this.cboEquipe.SelectedItem).LIBELLE);
                    res.Result.ForEach(t => t.NUMDEVIS           = this.dtProgram.SelectedDate.Value.ToShortDateString());
                    res.Result.ForEach(t => t.LIBELLETYPEDEMANDE = TypeDemande);
                    res.Result.ForEach(t => t.USERCREATION       = NumeroProgramme);
                    Utility.ActionDirectOrientation <ServicePrintings.ObjELEMENTDEVIS, ObjELEMENTDEVIS>(res.Result, null, SessionObject.CheminImpression, "FicheProgrammation", "Devis", true);
                    Message.ShowInformation("Programmation effectuée", Langue.lbl_Menu);
                    this.DialogResult = true;
                };
                service1.RetourneElementDEvisFromIdDemandeAsync(demandes);
                service1.CloseAsync();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #4
0
        private void EditerFacture(List <CsFactureBrut> leResultatFacturationbrut)
        {
            string rdlc = string.Empty;
            Dictionary <string, string> param = new Dictionary <string, string>();

            if (laDetailDemande.LstEvenement.First().PRODUIT == SessionObject.Enumere.ElectriciteMT)
            {
                rdlc = "FactureSimpleMT";
            }
            else if (laDetailDemande.LstEvenement.First().PRODUIT == SessionObject.Enumere.Eau)
            {
                rdlc = "FactureSimpleO";
            }
            else
            {
                rdlc = "FactureSimple";
            }

            param.Add("TypeEdition", "Originale");
            AcceuilServiceClient clientDevis = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));

            clientDevis.EditionFactureResiliationCompleted += (ss, b) =>
            {
                if (b.Cancelled || b.Error != null)
                {
                    string error = b.Error.Message;
                    Message.ShowError(error, Silverlight.Resources.Devis.Languages.txtDevis);
                    return;
                }
                List <CsFactureClient> _laStat = b.Result;
                Utility.ActionDirectOrientation <ServicePrintings.CsFactureClient, CsFactureClient>(_laStat, param, SessionObject.CheminImpression, rdlc, "Facturation", true);
            };
            clientDevis.EditionFactureResiliationAsync(leResultatFacturationbrut);
        }
Example #5
0
 private void ValiderChoix(List <CsDemandeBase> lesDemandeSelect)
 {
     try
     {
         AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
         service1.InsertLiaisonCompteurCompleted += (sr, res) =>
         {
             this.btn_Transmetre.IsEnabled = true;
             if (res != null && res.Cancelled)
             {
                 return;
             }
             List <CsDemandeBase> resultat = res.Result;
             if (resultat != null && resultat.Count != 0)
             {
                 Utility.ActionDirectOrientation <ServicePrintings.CsDemandeBase, CsDemandeBase>(resultat, null, SessionObject.CheminImpression, "LiaisonCompteur", "Accueil", true);
                 Message.ShowInformation("Liaisons de compteurs effectuées", Langue.lbl_Menu);
                 this.DialogResult = true;
             }
             else
             {
                 Message.ShowError("Aucun compteur trouvé", Langue.lbl_Menu);
             }
         };
         service1.InsertLiaisonCompteurAsync(lesDemandeSelect);
         service1.CloseAsync();
     }
     catch
     {
     }
 }
        private void EditionSortieMateriel(List <CsCanalisation> lstCanaisation)
        {
            try
            {
                List <ObjELEMENTDEVIS> lstMateriel = new List <ObjELEMENTDEVIS>();
                foreach (CsCanalisation item in lstCanaisation)
                {
                    ObjELEMENTDEVIS lstMat = new ObjELEMENTDEVIS();
                    lstMat.NUMDEM        = item.NUMDEM;
                    lstMat.DESIGNATION   = item.LIBELLEMATERIEL;
                    lstMat.QUANTITE      = item.QUANTITE;
                    lstMat.QUANTITERECAP = this.txt_LibelleAgentLivreur.Text;
                    lstMat.MontantRecap  = this.txt_LibelleAgentRecepteur.Text;

                    lstMat.NUMFOURNITURE    = LeProgramme.LIBELLEEQUIPE;
                    lstMat.NUMDEVIS         = LeProgramme.DATEPROGRAMME.Value.ToShortDateString();
                    lstMat.USERMODIFICATION = LeProgramme.NUMPROGRAMME;

                    lstMateriel.Add(lstMat);
                }
                Utility.ActionDirectOrientation <ServicePrintings.ObjELEMENTDEVIS, ObjELEMENTDEVIS>(lstMateriel, null, SessionObject.CheminImpression, "SortieMateriel", "Devis", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void EditionSortieMateriel(List <CsDemande> lesDemandes)
        {
            List <CsEditionDevis> LstDesRubriqueDevis = new List <CsEditionDevis>();

            foreach (var item in lesDemandes)
            {
                foreach (ObjELEMENTDEVIS leObjeDevis in item.EltDevis.Where(t => t.FK_IDMATERIELDEVIS != null && t.FK_IDMATERIELDEVIS != 0).ToList())
                {
                    CsEditionDevis LaRubriqueDevis = new CsEditionDevis();
                    LaRubriqueDevis.CENTRE      = item.LaDemande.CENTRE;
                    LaRubriqueDevis.PRODUIT     = item.LaDemande.LIBELLEPRODUIT;
                    LaRubriqueDevis.TYPEDEMANDE = item.LaDemande.LIBELLETYPEDEMANDE;
                    LaRubriqueDevis.COMMUNUE    = item.Ag.LIBELLECOMMUNE;
                    LaRubriqueDevis.QUARTIER    = item.Ag.LIBELLEQUARTIER;
                    LaRubriqueDevis.NOM         = item.LeClient.NOMABON;
                    LaRubriqueDevis.NUMDEMANDE  = item.LaDemande.NUMDEM;
                    LaRubriqueDevis.LATITUDE    = item.Branchement.LATITUDE;
                    LaRubriqueDevis.LONGITUDE   = item.Branchement.LONGITUDE;
                    LaRubriqueDevis.DESIGNATION = leObjeDevis.DESIGNATION;
                    LaRubriqueDevis.QUANTITE    = Convert.ToDecimal(leObjeDevis.QUANTITE);
                    LstDesRubriqueDevis.Add(LaRubriqueDevis);
                }
            }
            Utility.ActionDirectOrientation <ServicePrintings.CsEditionDevis, CsEditionDevis>(LstDesRubriqueDevis, null, SessionObject.CheminImpression, "ValidationMateriel", "Devis", true);
        }
 private void TauxDetraitement(List <int> lstCentre, DateTime dateDebut, DateTime dateFin)
 {
     Galatee.Silverlight.ServiceReclamation.ReclamationsServiceClient client = new Galatee.Silverlight.ServiceReclamation.ReclamationsServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Reclamation"));
     client.SuiviTauxTraitementCompleted += (ssender, args) =>
     {
         if (args.Cancelled || args.Error != null)
         {
             string error = args.Error.Message;
             Message.ShowError(error, "");
             return;
         }
         if (args.Result == null)
         {
             Message.ShowInformation("Aucune information trouvée", "Report");
             return;
         }
         Dictionary <string, string> parame = new Dictionary <string, string>();
         parame.Add("DateDebut", dateDebut.Date.ToShortDateString());
         parame.Add("DateFin", dateFin.Date.ToShortDateString());
         if (args.Result != null)
         {
             Utility.ActionDirectOrientation <ServicePrintings.cStatistiqueReclamation, Galatee.Silverlight.ServiceReclamation.cStatistiqueReclamation>(args.Result, parame, SessionObject.CheminImpression, "SuiviTauxTraitement", "Reclamation", true);
         }
     };
     client.SuiviTauxTraitementAsync(dateDebut, dateFin, lstCentre);
 }
        private void ListeDesTransactions(CsHabilitationCaisse laCaisse)
        {
            int handler = LoadingManager.BeginLoading("Traitement en cours ...");

            try
            {
                if (!string.IsNullOrWhiteSpace(TxtDateCaisse.Text))
                {
                    DateTime debut = DateTime.Today;
                    DateTime fin   = (DateTime.Today.AddDays(1));

                    CaisseServiceClient proxy = new CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse"));
                    proxy.LitseDesTransactionAsync(laCaisse);
                    proxy.LitseDesTransactionCompleted += (senders, results) =>
                    {
                        if (results.Cancelled || results.Error != null)
                        {
                            string error = results.Error.Message;
                            MessageBox.Show("errror occurs while calling remote method", "ReportListeEncaissements", MessageBoxButton.OK);
                            return;
                        }
                        if (results.Result == null || results.Result.Count == 0)
                        {
                            Message.ShowInformation("Aucune donnée trouvée", "Caisse");
                            return;
                        }

                        List <ServiceCaisse.CsLclient> dataTable = new List <ServiceCaisse.CsLclient>();
                        List <ServiceCaisse.CsLclient> tri       = new List <ServiceCaisse.CsLclient>();
                        dataTable.AddRange(results.Result);

                        tri   = results.Result.OrderBy(t => t.DTRANS).ToList();
                        debut = tri[0].DTRANS.Value;
                        fin   = tri[tri.Count - 1].DTRANS.Value;


                        Dictionary <string, string> param = new Dictionary <string, string>();
                        param.Add("pUser", !string.IsNullOrWhiteSpace(SessionObject.LaCaisseCourante.MATRICULE) ? "Matricule : " + SessionObject.LaCaisseCourante.NOMCAISSE  : "Matricule :Aucun");
                        param.Add("pDateDebut", "Date debut : " + debut);
                        param.Add("pDateFin", "Date fin : " + fin);

                        string key = Utility.getKey();
                        Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceCaisse.CsLclient>(dataTable, param, SessionObject.CheminImpression, "ListeDesTransactions".Trim(), "Caisse".Trim(), true);
                        LoadingManager.EndLoading(handler);
                    };
                }
                else
                {
                    Message.Show("Veuillez choisir un utilisateur et réessayer svp! ", "Information");
                    LoadingManager.EndLoading(handler);
                }
            }
            catch (Exception ex)
            {
                LoadingManager.EndLoading(handler);
            }
            finally
            {
            }
        }
        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");
                }
            }
        }
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null && (lstSource != null && lstSource.Count != 0))
     {
         Utility.ActionDirectOrientation <ServicePrintings.CsDetailMoratoire, ServiceRecouvrement.CsDetailMoratoire>(lstSource, null, SessionObject.CheminImpression, "SuivieMoratoire", "Recouvrement", true);
     }
 }
        private void ValiderAnnulation()
        {
            CsEnteteFacture laFactureSelect = (CsEnteteFacture)this.cmbFacture.SelectedItem;

            laDetailDemande.LaDemande.USERMODIFICATION = UserConnecte.matricule;

            ServiceAccueil.AcceuilServiceClient services = new ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
            services.ValiderAnnulationFactureCompleted += (ss, argss) =>
            {
                if (argss.Cancelled || argss.Error != null)
                {
                    string error = argss.Error.Message;
                    Message.ShowError(error, this.Title.ToString());
                    return;
                }
                if (string.IsNullOrEmpty(argss.Result))
                {
                    Message.ShowInformation("Demande validée avec succès", this.Title.ToString());

                    if (this.chk_Quitance.IsChecked == true)
                    {
                        List <CsEnteteFacture> lstFacture = (List <CsEnteteFacture>) this.dtg_DetailFacture.ItemsSource;
                        Utility.ActionDirectOrientation <ServicePrintings.CsEnteteFacture, ServiceFacturation.CsEnteteFacture>(lstFacture, null, SessionObject.CheminImpression, "QuittanceAnnulation", "Facturation", false);
                    }

                    this.DialogResult = true;
                }
                else
                {
                    Message.ShowError(argss.Result, this.Title.ToString());
                }
            };
            services.ValiderAnnulationFactureAsync(laDetailDemande, laFactureSelect.PK_ID);
            services.CloseAsync();
        }
Example #13
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.CsMaterielDemande, ServiceParametrage.CsMaterielDemande>(lstDonnee, param, SessionObject.CheminImpression, "Materiel", "Parametrage", true);
                }
                else if (ctrs.OptionSelect == SessionObject.EnvoiExecl)
                {
                    Utility.ActionExportation <ServicePrintings.CsMaterielDemande, ServiceParametrage.CsMaterielDemande>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, "Materiel", "Parametrage", true, "xlsx");
                }

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

                else if (ctrs.OptionSelect == SessionObject.EnvoiPdf)
                {
                    Utility.ActionExportation <ServicePrintings.CsMaterielDemande, ServiceParametrage.CsMaterielDemande>(lstDonnee, param, string.Empty, SessionObject.CheminImpression, "Materiel", "Parametrage", true, "pdf");
                }
            }
        }
        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 RetourneHabilitationUser(List <int> ListidClient)
        {
            string key      = Utility.getKey();
            int    response = LoadingManager.BeginLoading(Galatee.Silverlight.Resources.Accueil.Langue.En_Cours);
            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);
                    LoadingManager.EndLoading(response);
                    return;
                }
                if (res.Result == null)
                {
                    Message.ShowInformation(Galatee.Silverlight.Resources.Langue.msgNodata, Galatee.Silverlight.Resources.Langue.informationTitle);
                    LoadingManager.EndLoading(response);
                    return;
                }
                LoadingManager.EndLoading(response);
                Utility.ActionDirectOrientation <ServicePrintings.CsHabilitationMenu, ServiceAdministration.CsHabilitationMenu>(res.Result, null, SessionObject.CheminImpression, "ReportHabillitationMenuUser", "Administration", true);
            };
            client.RetourneProfilUtilisateurAsync(lstIUSeru, key);
        }
Example #16
0
        private void RetourneAnnomalie(List <CsFactureBrut> leResultatFacturationbrut)
        {
            FacturationServiceClient service = new FacturationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Facturation"));

            service.RetourneLesteAnomalieCompleted += (s, args) =>
            {
                if (args != null && args.Cancelled)
                {
                    Message.Show(Langue.msgErrorFact, Langue.LibelleModule);
                    return;
                }
                if (args == null && args.Cancelled)
                {
                    Message.Show(Langue.msgErrorFact, Langue.LibelleModule);
                    return;
                }
                if (args.Result.Count != 0)
                {
                    Dictionary <string, string> param = new Dictionary <string, string>();
                    Utility.ActionDirectOrientation <ServicePrintings.CsAnnomalie, ServiceFacturation.CsAnnomalie>(args.Result, new Dictionary <string, string>(), SessionObject.CheminImpression, "AnomalieFacturation", "Facturation", true);
                }
            };
            service.RetourneLesteAnomalieAsync(leResultatFacturationbrut.First().LOTRI, leResultatFacturationbrut.First().FK_IDCENTRE);
            service.CloseAsync();
        }
Example #17
0
 private void ValiderReliaison(CsDemande lesDemande)
 {
     try
     {
         AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
         service1.EclipseSimpleCompteurTransitionCompleted += (sr, res) =>
         {
             if (res != null && res.Cancelled)
             {
                 return;
             }
             if (res.Result == true)
             {
                 List <CsDemandeBase> l = new List <CsDemandeBase>();
                 lesDemande.LaDemande.NOMCLIENT = lesDemande.Abonne.NOMABON;
                 l.Add(lesDemande.LaDemande);
                 Utility.ActionDirectOrientation <ServicePrintings.CsDemandeBase, CsDemandeBase>(l, null, SessionObject.CheminImpression, "LiaisonCompteur", "Accueil", true);
                 Message.ShowInformation("Liaisons de compteurs effectuées", "Devis");
                 this.DialogResult = true;
             }
             else
             {
                 Message.ShowError("Erreur a la liaison compteur", "Devis");
             }
         };
         service1.EclipseSimpleCompteurTransitionAsync(lesDemande);
         service1.CloseAsync();
     }
     catch
     {
     }
 }
Example #18
0
        private void RetourneAnnomalie(List <CsFactureBrut> leResultatFacturationbrut)
        {
            FacturationServiceClient service = new FacturationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Facturation"));

            service.RetourneLesteAnomalieCompleted += (s, args) =>
            {
                if (args != null && args.Cancelled)
                {
                    Message.Show(Langue.msgErrorFact, Langue.LibelleModule);
                    return;
                }
                if (args == null && args.Cancelled)
                {
                    Message.Show(Langue.msgErrorFact, Langue.LibelleModule);
                    return;
                }
                if (args.Result.Count != 0)
                {
                    string print = "Imprimé le " + DateTime.Now + " sur le poste " + SessionObject.LePosteCourant.NOMPOSTE + " par " + UserConnecte.nomUtilisateur + "(" + UserConnecte.matricule + ") du centre " + UserConnecte.LibelleCentre;

                    Dictionary <string, string> param = new Dictionary <string, string>();
                    param.Add("Print", print);

                    //Utility.ActionDirectOrientation<ServicePrintings.CsAnnomalie, ServiceFacturation.CsAnnomalie>(args.Result, new Dictionary<string, string>(), SessionObject.CheminImpression, "AnomalieFacturation", "Facturation", true);
                    Utility.ActionDirectOrientation <ServicePrintings.CsAnnomalie, ServiceFacturation.CsAnnomalie>(args.Result, param, SessionObject.CheminImpression, "AnomalieFacturation", "Facturation", true);
                }
            };
            service.RetourneLesteAnomalieAsync(leResultatFacturationbrut.First().LOTRI, leResultatFacturationbrut.First().FK_IDCENTRE);
            service.CloseAsync();
        }
Example #19
0
        private void MiseAjourCompt(decimal?Monant, int Id)
        {
            Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement"));
            service.MiseAjourComptCompleted += (s, args) =>
            {
                if (args != null && args.Cancelled)
                {
                    return;
                }
                if (args.Result == null)
                {
                    return;
                }
                Message.Show("Mise a jour efectué avec succes", "Resultat");
                Dictionary <string, string> param = new Dictionary <string, string>();

                Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceRecouvrement.CsLclient>(args.Result, param, SessionObject.CheminImpression, "MiseAJourGrandCompte", "Recouvrement", true);

                List <int> id = new List <int>();
                id.Add(Id);
                EnvoyerDemandeEtapeSuivante(id);
                return;
            };
            service.MiseAjourComptAsync(Monant, Id);
        }
 private void ListeDesReclamation(List <int> lstCentre, List <int> TypeReclamation, DateTime dateDebut, DateTime dateFin)
 {
     Galatee.Silverlight.ServiceReclamation.ReclamationsServiceClient client = new Galatee.Silverlight.ServiceReclamation.ReclamationsServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Reclamation"));
     client.ListDesReclamationCompleted += (ssender, args) =>
     {
         if (args.Cancelled || args.Error != null)
         {
             string error = args.Error.Message;
             Message.ShowError(error, "");
             return;
         }
         if (args.Result == null)
         {
             //Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
             Message.ShowInformation("Aucune information trouvée", "Report");
             return;
         }
         Dictionary <string, string> parame = new Dictionary <string, string>();
         parame.Add("DateDebut", dateDebut.Date.ToShortDateString());
         parame.Add("DateFin", dateFin.Date.ToShortDateString());
         if (args.Result != null)
         {
             Utility.ActionDirectOrientation <ServicePrintings.CsReclamationRcl, Galatee.Silverlight.ServiceReclamation.CsReclamationRcl>(args.Result, parame, SessionObject.CheminImpression, "ListeReclamations", "Reclamation", true);
         }
     };
     client.ListDesReclamationAsync(dateDebut, dateFin, lstCentre, TypeReclamation);
 }
Example #21
0
        private void EditionLot(List <CsLotCompteClient> ListLot)
        {
            try
            {
                if (this.chk_Transaction.IsChecked == true)
                {
                    EditerDetailLot(ListLot);
                }
                if (this.Chk_CompteClient.IsChecked == true)
                {
                    EditerCompteMisAjour(ListLot);
                }
                if (this.Chk_Batch.IsChecked == true)
                {
                    string key = Utility.getKey();
                    Dictionary <string, string> param = new Dictionary <string, string>();
                    //param.Add(Utility.setParam("pTypeRecu"), OperationCaisse);
                    Utility.ActionDirectOrientation <ServicePrintings.CsLotCompteClient, ServiceAccueil.CsLotCompteClient>(ListLot, param, SessionObject.CheminImpression, "AjustementTransaction", "Accueil", true);
                    //Utility.ActionImpressionDirect(this.TxtImprimante.Text, key, "AjustementTransaction", "Accueil");

                    this.DialogResult = true;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 private void btn_Imprimer_Click(object sender, RoutedEventArgs e)
 {
     if (this.dtg_CompteClient.ItemsSource != null)
     {
         List <CsLclient> lesFacture = (List <CsLclient>) this.dtg_CompteClient.ItemsSource;
         Utility.ActionDirectOrientation <ServicePrintings.CsLclient, CsLclient>(lesFacture, null, SessionObject.CheminImpression, "CompteResiliationClient", "Accueil", true);
     }
 }
Example #23
0
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null)
     {
         List <CsDetailCampagne> lstDonnees = (List <CsDetailCampagne>)lvwResultat.ItemsSource;
         Utility.ActionDirectOrientation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(lstDonnees, null, SessionObject.CheminImpression, "MauvaisPayeurs", "Recouvrement", true);
     }
 }
 private void btnAfficher_Copy_Click(object sender, RoutedEventArgs e)
 {
     if (lvwResultat.ItemsSource != null)
     {
         List <ServiceRecouvrement.CsDetailCampagne> dataTable = (List <ServiceRecouvrement.CsDetailCampagne>)lvwResultat.ItemsSource;
         Utility.ActionDirectOrientation <ServicePrintings.CsDetailCampagne, ServiceRecouvrement.CsDetailCampagne>(dataTable, null, SessionObject.CheminImpression, "ChequeImpaye", "Recouvrement", true);
     }
 }
Example #25
0
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     if (dataGrid1.ItemsSource != null)
     {
         List <CsAnnomalie> ListeAnnomalie = (List <CsAnnomalie>)dataGrid1.ItemsSource;
         Utility.ActionDirectOrientation <ServicePrintings.CsAnnomalie, ServiceFacturation.CsAnnomalie>(ListeAnnomalie, null, SessionObject.CheminImpression, "AnomalieFacturation", "Facturation", true);
     }
 }
Example #26
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 OKButton_Click(object sender, RoutedEventArgs e)
 {
     if (this.dtg_Facture.ItemsSource != null)
     {
         List <CsEnteteFacture> lstFacture = (List <CsEnteteFacture>) this.dtg_Facture.ItemsSource;
         Utility.ActionDirectOrientation <ServicePrintings.CsEnteteFacture, ServiceFacturation.CsEnteteFacture>(lstFacture, null, SessionObject.CheminImpression, "MontantFacture", "Facturation", false);
         this.DialogResult = false;
     }
 }
        private void EditionProgramme(List <ObjELEMENTDEVIS> leDevis)
        {
            List <ObjELEMENTDEVIS> list = new List <ObjELEMENTDEVIS>();

            list.AddRange(leDevis.Where(t => !t.ISEXTENSION).ToList());

            list.ForEach(t => t.USERCREATION = LeProgramme.NUMPROGRAMME);
            Utility.ActionDirectOrientation <ServicePrintings.ObjELEMENTDEVIS, ObjELEMENTDEVIS>(list, null, SessionObject.CheminImpression, "FicheProgrammation", "Devis", true);
        }
Example #29
0
        public List <ServiceReport.CsConnexion> GetPrintObjects(string module)
        {
            try
            {
                //if (Txt_Year.Text.Length != 4)
                //{
                //    return null;
                //}
                //else
                //{
                //IdProd =int.Parse(Cmb_Produit.SelectedValue.ToString());
                ReportServiceClient service = new ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint(module));
                //string mois = (Cmb_month.SelectedIndex < 0) ? null : (Cmb_month.SelectedIndex + 1).ToString("00");
                List <ServiceReport.CsConnexion> reportPrint = new List <CsConnexion>();

                int loaderHandler = LoadingManager.BeginLoading("Please Wait for pass payment ... ");
                service.GetNewBranchementsByProduitAsync(Txt_Year.Text, IdProd, Etat);
                service.GetNewBranchementsByProduitCompleted += (er, res) =>
                {
                    try
                    {
                        if (res.Error != null || res.Cancelled)
                        {
                            LoadingManager.EndLoading(loaderHandler);
                            throw new Exception("Cannot display report");
                        }
                        if (res.Result != null)
                        {
                            reportPrint = res.Result.OrderBy(c => c.Mois).ToList();

                            Dictionary <string, string> dico = new Dictionary <string, string>();
                            dico.Add("annee", Txt_Year.Text);
                            //Effectue l'aperçcu avant imprèssion
                            //Utility.ActionPreview<ServicePrintings.CsConnexion, Galatee.Silverlight.ServiceReport.CsConnexion>(reportPrint, dico, DefinedRDLC, module);
                            Utility.ActionDirectOrientation <ServicePrintings.CsConnexion, Galatee.Silverlight.ServiceReport.CsConnexion>(reportPrint, dico, SessionObject.DefaultPrinter, "VisuReportNewElectricityServiceConnection", module, false);
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                    finally
                    {
                        LoadingManager.EndLoading(loaderHandler);
                    }
                };

                //this.DefinedRDLC = "ConnexionsElectricite";
                return(reportPrint);
                //}
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void EditionSortieCompteur(List <CsCanalisation> lesCompteurs)
        {
            lesCompteurs.ForEach(t => t.COMMENTAIRE         = this.txt_LibelleAgentLivreur.Text);
            lesCompteurs.ForEach(t => t.ETATDUCOMPTEUR      = this.txt_LibelleAgentRecepteur.Text);
            lesCompteurs.ForEach(t => t.CODECALIBRECOMPTEUR = LeProgramme.LIBELLEEQUIPE);
            lesCompteurs.ForEach(t => t.BRANCHEMENT         = LeProgramme.DATEPROGRAMME.Value.ToShortDateString());
            lesCompteurs.ForEach(t => t.FONCTIONNEMENT      = LeProgramme.NUMPROGRAMME);

            Utility.ActionDirectOrientation <ServicePrintings.CsCanalisation, CsCanalisation>(lesCompteurs, null, SessionObject.CheminImpression, "SortieCompteur1", "Devis", true);
        }