private void RemplirCodeRegroupement(int iduserconnect) { try { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneRegroupementGestionnairesCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } LstCodeRegroupement = args.Result; if (LstCodeRegroupement != null) { cbo_regroupement.DisplayMemberPath = "NOM"; cbo_regroupement.SelectedValuePath = "CODE"; cbo_regroupement.ItemsSource = LstCodeRegroupement; } return; }; service.RetourneRegroupementGestionnairesAsync(iduserconnect); //} } catch (Exception ex) { throw ex; } }
private void SaveMandatement(List <CsPaiementGc> ListMandatementGc, bool ATransmettre = false) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SavePaiementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } if (args.Result == true) { Message.Show("Paiement enregistré avec succès", "Information"); if (ATransmettre == true) { RemplirCampagne(UserConnecte.matricule, true); } RemplirCampagne(UserConnecte.matricule); } else { Message.Show("Le Paiement n'a pas été enregistré avec succès,veuillez refaire l'opration ", "Information"); } return; }; Facture_Payer_Partiellement.MONTANT = Montant_Facture_RestAPayer; service.SavePaiementAsync(ListMandatementGc, Facture_Payer_Partiellement); }
private void SaveCampane(List <CsLclient> ListFacturation, CsRegCli csRegCli, int?ID_USER) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SaveCampaneCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { Message.ShowInformation("L'enregistrement ne c'est pas correctement effecaion veuillez refaire l'opération", "Recouvremen"); } if (chb_AvisDeCredit.IsChecked == true) { DetailCampagneGc = (List <CsDetailCampagneGc>)args.Result.First().Valeur; Listid.Add(int.Parse(args.Result.First().Key.ToString().Split('.')[0])); Shared.ClasseMEthodeGenerique.InitWOrkflow((args.Result.First().Key.ToString().Split('.')[0]), UserConnecte.FK_IDCENTRE, "Galatee.Silverlight.Recouvrement.FrmInitailisationCampagne", args.Result.First().Key.ToString().Split('.')[1], SaveMandatement, DetailCampagneGc); } else { Shared.ClasseMEthodeGenerique.InitWOrkflow(args.Result.First().Key.ToString().Split('.')[0], UserConnecte.FK_IDCENTRE, "Galatee.Silverlight.Recouvrement.FrmInitailisationCampagne", args.Result.First().Key.ToString().Split('.')[1]); } Message.ShowInformation("L'enregistrement effecaion avec succes", "Recouvremen"); return; }; service.SaveCampaneAsync(ListFacturation, csRegCli, ID_USER); }
private void ValiderRendezVous(CsClient leClient, DateTime laDateRendezVous) { try { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient client = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); client.SaveRDVCoupureHorsCampagneAsync(leClient, laDateRendezVous); client.SaveRDVCoupureHorsCampagneCompleted += (ss, args) => { try { if (args.Cancelled || args.Error != null) { string error = args.Error.Message; Message.ShowError("Error à l'appel du service", "SearchCampagne"); return; } if (args.Result == true) { Message.ShowInformation("Mise a jour validée", "Rendez-vous"); this.DialogResult = false; return; } this.DialogResult = false; } catch (Exception ex) { Message.ShowError(ex, Galatee.Silverlight.Resources.Langue.errorTitle); } }; } catch (Exception ex) { Message.ShowError(ex.Message, Galatee.Silverlight.Resources.Langue.errorTitle); } }
private void SaveMandatement(List <CsMandatementGc> ListMandatementGc) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SaveMandatementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } if (args.Result == true) { Message.Show("Mandatment enregistré avec succes", "Information"); } else { Message.Show("Le Mandatment n'a pas été enregistré avec succes,veuillez refaire l'opration ", "Information"); } return; }; service.SaveMandatementAsync(ListMandatementGc); }
private void ChargerPiaAgence(string CodeSite) { try { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetournePIAAgenceCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } List <CsUtilisateur> lstPia = new List <CsUtilisateur>(); lstPia.Add(new CsUtilisateur() { LIBELLE = "Aucun" }); lstPia.AddRange(args.Result); this.cmbAgent.ItemsSource = null; this.cmbAgent.ItemsSource = lstPia; this.cmbAgent.DisplayMemberPath = "LIBELLE"; return; }; service.RetournePIAAgenceAsync(CodeSite); service.CloseAsync(); } catch (Exception ex) { throw ex; } }
private void RecupererPeriodeDePlage(string DebutPeriode, string FinPeriode) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RecupererPeriodeDePlageCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } var DataSource = args.Result; DataSource.ForEach(a => ClasseMEthodeGenerique.FormatPeriodeMMAAAA(a)); foreach (var item in lbx_Periode.Items) { DataSource.Add(item.ToString()); } lbx_Periode.Items.Clear(); foreach (var p in DataSource.OrderBy(p => p)) { var periode = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(p); lbx_Periode.Items.Add(periode); } return; }; service.RecupererPeriodeDePlageAsync(DebutPeriode, FinPeriode); }
public void SaveMandatement(dynamic param) { List <CsDetailCampagneGc> ListMandatementGc = (List <CsDetailCampagneGc>)param; Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SaveMandatementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } if (args.Result == true) { EnvoyerDemandeEtapeSuivante(Listid); } else { Message.Show("Le Mandatment n'a pas été enregistré ", "Information"); } return; }; service.SaveMandatementAsync(ListMandatementGc, true); }
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 Button_Click(object sender, RoutedEventArgs e) { allowProgressBar(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneListeFactureNonSoldeCompleted += (s, args) => { if (args != null && args.Cancelled) { Message.ShowError("Une erreur est survenu lors du traitement", "Erreur"); } if (args.Result == null || args.Result.Count <= 0) { Message.ShowInformation("Aucune données corresponte aux critères", "Information"); } //Lstfacture = args.Result; dg_facture.ItemsSource = args.Result; desableProgressBar(); //btn_Rech.IsEnabled = true; //desableProgressBar(); return; }; string centre = !string.IsNullOrWhiteSpace(txt_centre.Text) ? txt_centre.Text : string.Empty; string client = !string.IsNullOrWhiteSpace(txt_client.Text) ? txt_client.Text : string.Empty; string ordre = !string.IsNullOrWhiteSpace(txt_ordre.Text) ? txt_ordre.Text : string.Empty; string periode = !string.IsNullOrWhiteSpace(txt_periode.Text) ? txt_periode.Text : string.Empty; service.RetourneListeFactureNonSoldeAsync(centre, client, ordre, 0, periode); }
private void ChargerClientFromReference(int idCentre, string ReferenceClient, string Ordre) { try { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneClientByReferenceOrdreCompleted += (s, args) => { if ((args != null && args.Cancelled) || (args.Error != null)) { return; } if (args.Result != null) { this.Txt_NomClient.Text = args.Result.NOMABON; this.Txt_AdresseClient.Text = !string.IsNullOrEmpty(args.Result.ADRESSE)?args.Result.ADRESSE :string.Empty; this.Txt_ReferenceClient.Tag = args.Result; } }; service.RetourneClientByReferenceOrdreAsync(idCentre, ReferenceClient, Ordre); service.CloseAsync(); } catch (Exception) { Message.ShowError("Erreur au chargement des données", "Demande"); } }
private void RemplirCodeRegroupement() { try { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneCodeRegroupementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } LstCodeRegroupement = args.Result; if (LstAffectation != null) { ReLoadingGrid(); } return; }; service.RetourneCodeRegroupementAsync(); //} } catch (Exception ex) { throw ex; } }
//private void RemplirCampagne(string Matricule ) //{ // Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); // service.RemplirCampagneCompleted += (s, args) => // { // if (args != null && args.Cancelled) // return; // if (args.Result == null) // return; // ListCapagneGc = args.Result; // List<CsDetailCampagneGc> ListeDetailCampagneAsuprimmer = new List<CsDetailCampagneGc>(); // foreach (var item in ListCapagneGc) // { // foreach (var item_ in item.DETAILCAMPAGNEGC_) // { // item_.MONTANT_RESTANT = 0; // item_.MONTANT_REGLER = 0; // foreach (var mand in item.MANDATEMENTGC_) // { // var detailmand = mand.DETAILMANDATEMENTGC_.Where(dm => dm.CENTRE == item_.CENTRE && dm.CLIENT == item_.CLIENT && dm.ORDRE == item_.ORDRE && dm.NDOC == item_.NDOC); // if (detailmand!=null) // { // item_.MONTANT_REGLER = item_.MONTANT_REGLER + detailmand.Sum(c => c.MONTANT); // } // } // item_.MONTANT_RESTANT = item_.MONTANT - item_.MONTANT_REGLER; // if (item_.MONTANT_RESTANT<=0) // { // ListeDetailCampagneAsuprimmer.Add(item_); // } // item_.MONTANT_VERSER = 0; // } // } // foreach (var item in ListeDetailCampagneAsuprimmer) // { // ListCapagneGc[0].DETAILCAMPAGNEGC_.Remove(item); // } // if (ListCapagneGc[0].DETAILCAMPAGNEGC_.Count<=0) // { // Message.Show("Cette campagne à été totalement réglé par mandatement,prette à etre transmise à l'étape suivante", "Information"); // ListCapagneGc[0].DETAILCAMPAGNEGC_ = ListeDetailCampagneAsuprimmer; // //this.Close(); // //this.DialogResult = true; // //txt_MontantMandatement.IsEnabled = false; // //txt_Numdeataire.IsEnabled = false; // //chbx_ToutValider.IsEnabled = false; // //dg_facture.IsReadOnly = true; // } // dg_Campagne.ItemsSource = ListCapagneGc.Where(c => c.PK_ID == this.IdCampagne); // dg_Campagne.SelectedItem = ListCapagneGc[0]; // return; // }; // service.RemplirCampagneAsync(Matricule); //} private void SaveMandatement(List <CsDetailCampagneGc> ListMandatementGc) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SaveMandatementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } if (args.Result == true) { Message.Show("Mandatment enregistré avec succes", "Information"); List <int> Listid = new List <int>(); Listid.Add(ListCapagneGc.First().PK_ID); EnvoyerDemandeEtapeSuivante(Listid); } else { Message.Show("Le Mandatment n'a pas été enregistré ,veuillez saisir un numéro de mandatement different ", "Information"); } return; }; service.SaveMandatementAsync(ListMandatementGc); }
private void ChargerListeAgentPIA(int idCentre, string CodeFonction) { ListeUtilisateurPia = new List <CsUtilisateur>(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneListeUtiliasteurPiaAsync(idCentre, CodeFonction); service.RetourneListeUtiliasteurPiaCompleted += (s, args) => { try { if (args.Cancelled || args.Error != null) { Message.ShowError("Erreur survenue à l'appel du service.", "Erreur"); return; } if (args.Result == null || args.Result.Count == 0) { Message.ShowError("Aucune tournée retournée par le système.", "Info"); return; } ListeUtilisateurPia = args.Result; this.CboAgentPia.ItemsSource = null; this.CboAgentPia.ItemsSource = ListeUtilisateurPia; this.CboAgentPia.DisplayMemberPath = "LIBELLE"; this.CboAgentPia.ItemsSource = ListeUtilisateurPia.Where(t => t.FK_IDCENTRE == (int)this.Txt_Centre.Tag); } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; }
private void ChargerListeTourneePIA(List <int> idcentre) { ListeTournee = new List <CsTournee>(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneTourneePIAAsync(idcentre); service.RetourneTourneePIACompleted += (s, args) => { try { if (args.Cancelled || args.Error != null) { Message.ShowError("Erreur survenue à l'appel du service.", "Erreur"); return; } if (args.Result == null || args.Result.Count == 0) { Message.ShowError("Aucune tournée retournée par le système.", "Info"); return; } ListeTournee = args.Result; } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; }
private void RemplirCampagne(string Matricule) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RemplirCampagneByIdCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } LaCampagneGc = args.Result; List <CsDetailCampagneGc> ListeDetailCampagneAsuprimmer = new List <CsDetailCampagneGc>(); foreach (var item_ in LaCampagneGc.DETAILCAMPAGNEGC_) { item_.MONTANT_RESTANT = 0; item_.MONTANT_REGLER = 0; foreach (var mand in LaCampagneGc.MANDATEMENTGC_) { var detailmand = mand.DETAILMANDATEMENTGC_.Where(dm => dm.CENTRE == item_.CENTRE && dm.CLIENT == item_.CLIENT && dm.ORDRE == item_.ORDRE && dm.NDOC == item_.NDOC); if (detailmand != null) { item_.MONTANT_REGLER = item_.MONTANT_REGLER + detailmand.Sum(c => c.MONTANT); } } item_.MONTANT_RESTANT = item_.MONTANT - item_.MONTANT_REGLER; if (item_.MONTANT_RESTANT <= 0) { ListeDetailCampagneAsuprimmer.Add(item_); } item_.MONTANT_VERSER = 0; } foreach (var item in ListeDetailCampagneAsuprimmer) { LaCampagneGc.DETAILCAMPAGNEGC_.Remove(item); } if (LaCampagneGc.DETAILCAMPAGNEGC_.Count <= 0) { Message.Show("Cette campagne à été totalement réglé par mandatement,prette à etre transmise à l'étape suivante", "Information"); LaCampagneGc.DETAILCAMPAGNEGC_ = ListeDetailCampagneAsuprimmer; } ListCapagneGc.Add(LaCampagneGc); dg_Campagne.ItemsSource = ListCapagneGc; if (ListCapagneGc != null && ListCapagneGc.Count != 0) { dg_Campagne.SelectedItem = ListCapagneGc.First(); } this.dg_facture.ItemsSource = LaCampagneGc.DETAILCAMPAGNEGC_; return; }; service.RemplirCampagneByIdAsync(this.IdCampagne); }
//Recherche des factures sen fonction des critère entré private void RemplirfactureProduit(CsRegCli csRegCli, List <string> listperiode, List <int> lstIdProduit) { //Activation du busy indicator allowProgressBar(); //Grisé certain éléments du formulaire pour bloqué certainnes actions ActiverElement(false); //Exécution du service web recupération des factures Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RemplirfactureAvecProduitCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } Lstfacture = args.Result; if (this.Anciennecamp != null) { foreach (var item_ in this.Anciennecamp) { foreach (var item in item_.DETAILCAMPAGNEGC_) { CsLclient facture = new CsLclient(); facture.CENTRE = item.CENTRE; facture.CLIENT = item.CLIENT; facture.ORDRE = item.ORDRE; facture.NOM = item.NOM; facture.REFEM = item.PERIODE; facture.SOLDEFACTURE = item.MONTANT; facture.NDOC = item.NDOC; Lstfacture.Add(facture); } } } System.Windows.Data.PagedCollectionView view = new System.Windows.Data.PagedCollectionView(Lstfacture); LoadDataPager <CsLclient>(Lstfacture, datapager, dg_facture); if (dg_facture.ItemsSource != null) { this.txt_TotalFacture.Text = Lstfacture.Sum(c => (c.SOLDEFACTURE != null ? c.SOLDEFACTURE : 0)).Value.ToString(SessionObject.FormatMontant); } btn_Rech.IsEnabled = true; desableProgressBar(); ActiverElement(true); return; }; service.RemplirfactureAvecProduitAsync(csRegCli, listperiode, lstIdProduit); }
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); }
void ChargerIndexCampagne(int Regroupement) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.ChargerClientPourSaisiIndexCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } List <CsDetailCampagne> lstCampagne = args.Result; lvwResultat.ItemsSource = null; lvwResultat.ItemsSource = lstCampagne; return; }; service.ChargerClientPourSaisiIndexAsync(Regroupement); }
private void RemplirCampagneById(int IdCampagne) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RemplirCampagneByIdCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } CampagneGc = args.Result; //txt_periode.Text = CampagneGc.PERIODE; ReLoadingGrid(); LstCampagneGc.Clear(); LstCampagneGc.Add(CampagneGc); List <CsDetailCampagneGc> ListeDetailCampagneAsuprimmer = new List <CsDetailCampagneGc>(); MontantPayer = 0; foreach (var item in LstCampagneGc) { foreach (var item_ in item.DETAILCAMPAGNEGC_) { item_.MONTANT_RESTANT = 0; item_.MONTANT_REGLER = 0; foreach (var mand in item.MANDATEMENTGC_) { var detailmand = mand.DETAILMANDATEMENTGC_.Where(dm => dm.CENTRE == item_.CENTRE && dm.CLIENT == item_.CLIENT && dm.ORDRE == item_.ORDRE && dm.NDOC == item_.NDOC); if (detailmand != null) { item_.MONTANT_REGLER = item_.MONTANT_REGLER + detailmand.Sum(c => c.MONTANT); } } MontantPayer = MontantPayer + item_.MONTANT_REGLER.Value; item_.MONTANT_RESTANT = item_.MONTANT - item_.MONTANT_REGLER; item_.MONTANT_VERSER = 0; } } dg_campagne.ItemsSource = LstCampagneGc.Where(c => c.PK_ID == this.IdCampagne); dg_campagne.SelectedItem = LstCampagneGc[0]; return; }; service.RemplirCampagneByIdAsync(IdCampagne); }
private void Remplirfacture(CsRegCli csRegCli, List <string> listperiode) { allowProgressBar(); ActiverElement(false); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RemplirfactureCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } Lstfacture = args.Result; if (this.Anciennecamp != null) { foreach (var item_ in this.Anciennecamp) { foreach (var item in item_.DETAILCAMPAGNEGC_) { CsLclient facture = new CsLclient(); facture.CENTRE = item.CENTRE; facture.CLIENT = item.CLIENT; facture.ORDRE = item.ORDRE; facture.NOM = item.NOM; facture.REFEM = item.PERIODE; facture.SOLDEFACTURE = item.MONTANT; facture.NDOC = item.NDOC; Lstfacture.Add(facture); } } } System.Windows.Data.PagedCollectionView view = new System.Windows.Data.PagedCollectionView(Lstfacture); LoadDataPager <CsLclient>(Lstfacture, datapager, dg_facture); if (dg_facture.ItemsSource != null) { this.txt_TotalFacture.Text = Lstfacture.Sum(t => t.SOLDEFACTURE).Value.ToString(SessionObject.FormatMontant); } btn_Rech.IsEnabled = true; desableProgressBar(); ActiverElement(true); return; }; service.RemplirfactureAsync(csRegCli, listperiode); }
private void Button_Click(object sender, RoutedEventArgs e) { allowProgressBar(); CsClient leClient = new CsClient(); leClient.CENTRE = txt_centre.Text; leClient.REFCLIENT = txt_client.Text; leClient.ORDRE = txt_ordre.Text; if (string.IsNullOrWhiteSpace(txt_centre.Text) || string.IsNullOrWhiteSpace(txt_client.Text) || string.IsNullOrWhiteSpace(txt_ordre.Text)) { Message.ShowInformation("Le centre ,la reference client et l'ordre sont obligatoire", "Information"); return; } Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneListeFactureNonSoldeGCAsync(leClient); service.RetourneListeFactureNonSoldeGCCompleted += (s, args) => { if (args != null && args.Cancelled) { Message.ShowError("Une erreur est survenu lors du traitement", "Erreur"); } if (args.Result == null || args.Result.Count <= 0) { Message.ShowInformation("Aucune données corresponte aux critères", "Information"); } var ItemsSource = args.Result; if (!string.IsNullOrEmpty(this.txt_periode.Text)) { ItemsSource = ItemsSource.Where(t => t.REFEM == this.txt_periode.Text).ToList(); } if (!string.IsNullOrEmpty(this.txt_periode.Text)) { ItemsSource = ItemsSource.Where(t => t.NDOC == this.txt_Num_Fac.Text).ToList(); } dg_facture.ItemsSource = ItemsSource; desableProgressBar(); return; }; }
private void SaisiPaiement(decimal?Monant, int Id) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SaisiPaiementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } Message.Show("Mise a jour efectué avec succes", "Resultat"); return; }; service.SaisiPaiementAsync(Monant, Id); }
void ChargerCampagne(int Regroupement) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.ChargerCampagneCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } List <CsCampagneGc> lstCampagne = args.Result; this.Cbo_Campagne.ItemsSource = null; this.Cbo_Campagne.DisplayMemberPath = "NUMEROCAMPAGNE"; this.Cbo_Campagne.ItemsSource = lstCampagne; return; }; service.ChargerCampagneAsync(Regroupement); }
private void RechercheCampane(string NumCamp) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RechercheCampaneCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { Message.ShowInformation("L'opération ne c'est pas correctement effecaion ,veuillez la refaire ", "Recouvrement"); } dg_campagne.ItemsSource = args.Result; return; }; service.RechercheCampaneAsync(NumCamp); }
private void RetournCampagneByRegcli(ServiceRecouvrement.CsRegCli Regroupement, string periode) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetournCampagneByRegcliCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } LstCampagneGc = args.Result; dg_campagne.ItemsSource = LstCampagneGc; return; }; service.RetournCampagneByRegcliAsync(Regroupement, periode); }
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"); List <int> id = new List <int>(); id.Add(Id); EnvoyerDemandeEtapeSuivante(id); return; }; service.MiseAjourComptAsync(Monant, Id); }
private void VerifierCampagneExiste(CsRegCli csRegCli, string periode) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.VerifierCampagneExisteCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { return; } FrmCampagne frm = new FrmCampagne(args.Result); frm.CallBack += frm_CallBack; frm.Closing += frm_Closing; frm.Show(); return; }; service.VerifierCampagneExisteAsync(csRegCli, periode); }
private void SaveCampane(List <CsLclient> ListFacturation, CsRegCli csRegCli, int?ID_USER) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SaveCampaneCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null) { Message.ShowInformation("L'enregistrement ne c'est pas correctement effecaion veuillez refaire l'opération", "Recouvremen"); } Shared.ClasseMEthodeGenerique.InitWOrkflow(args.Result.Split('.')[0], UserConnecte.FK_IDCENTRE, "Galatee.Silverlight.Recouvrement.FrmInitailisationCampagne", args.Result.Split('.')[1]); Message.ShowInformation("L'enregistrement effecaion avec succes", "Recouvremen"); return; }; service.SaveCampaneAsync(ListFacturation, csRegCli, ID_USER); }
private void RemplirCodeRegroupement() { try { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RetourneCodeRegroupementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } LstCodeRegroupement = args.Result; RemplirCampagneById(this.IdCampagne); return; }; service.RetourneCodeRegroupementAsync(); } catch (Exception ex) { throw ex; } }