Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        private void MiseAjourCompt(List <CsDetailPaiementGc> lstDetailPaiement, 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;
                }
                if (args.Result.Count == 0)
                {
                    return;
                }
                Message.Show("Mise à jour effectuée avec succès", "Resultat");
                Dictionary <string, string> param = new Dictionary <string, string>();
                var lesCompteMaj = args.Result.Select(u => new { u.CENTRE, u.CLIENT, u.ORDRE, u.NOM, u.ACQUIT, u.REFEM, u.NDOC, u.NUMDEVIS, u.NUMDEM }).Distinct();
                List <CsLclient> lesCompteAEditer = new List <CsLclient>();
                int i = 0;
                foreach (var item in lesCompteMaj)
                {
                    CsLclient leC = new CsLclient();
                    leC.CENTRE   = item.CENTRE;
                    leC.CLIENT   = item.CLIENT;
                    leC.ORDRE    = item.ORDRE;
                    leC.REFEM    = item.REFEM;
                    leC.NDOC     = item.NDOC;
                    leC.NOM      = item.NOM;
                    leC.NUMDEM   = item.NUMDEM;
                    leC.NUMDEVIS = item.NUMDEVIS;
                    leC.NUMETAPE = i + 1;
                    leC.ADRESSE  = txt_Campagne.Text;
                    leC.CAPUR    = System.DateTime.Today.ToShortDateString();
                    leC.MONTANT  = args.Result.Where(t => t.CENTRE == item.CENTRE && t.CLIENT == item.CLIENT && t.ORDRE == item.ORDRE && t.REFEM == item.REFEM && t.NDOC == item.NDOC).Sum(t => t.MONTANT);

                    lesCompteAEditer.Add(leC);
                }
                param.Add("pUserMiseAJour", UserConnecte.nomUtilisateur);
                Utility.ActionDirectOrientation <ServicePrintings.CsLclient, ServiceRecouvrement.CsLclient>(lesCompteAEditer, param, SessionObject.CheminImpression, "MiseAJourGrandCompte", "Recouvrement", true);
                this.DialogResult = true;
                //List<int> id = new List<int>();
                //id.Add(Id);
                //EnvoyerDemandeEtapeSuivante(id);
                return;
            };
            service.MiseAjourComptAsync(lstDetailPaiement, Id);
        }
 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");
         return;
     };
     service.MiseAjourComptAsync(Monant, Id);
 }