private void OKButton_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrWhiteSpace(txt_numeroCampagne.Text)) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.AnnulerCampagneCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == false) { Message.ShowInformation("L'enregistrement ne c'est pas correctement , veuillez vous assuré que la campagne existe", "Recouvrement"); } else { Message.ShowInformation("L'enregistrement effectué avec succes", "Recouvrement"); } //Shared.ClasseMEthodeGenerique.InitWOrkflow(args.Result.Split('.')[0], UserConnecte.FK_IDCENTRE, "Galatee.Silverlight.Recouvrement.FrmInitailisationCampagne", args.Result.Split('.')[1]); return; }; service.AnnulerCampagneAsync(txt_numeroCampagne.Text); } else { Message.ShowWarning("Veuillez saisir le numero de la campagne à annuler", "Recouvrement"); } }
private void LoadMethodeDetection() { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des factures ..."); service.GetMethodeDetectionBTAAsync(); service.GetMethodeDetectionBTACompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { cbxmethrech.ItemsSource = res.Result; cbxmethrech.DisplayMemberPath = "Libele_Methode"; cbxmethrech.SelectedValuePath = "Methode_ID"; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception) { throw; } }; }
private void InitialisationFraude() { ////Association de campagne à liste de branchement selection Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Traitement de données ..."); //service.SaveCampagneElementAsync(listecampageneTosave, new CsREFMETHODEDEDETECTIONCLIENTSBTA(), ""); service.InitialisationFraudAsync(ListElementLot); service.InitialisationFraudCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception) { throw; } }; }
public void LoadBranchement(List <Galatee.Silverlight.ServiceRecouvrement.CsClient> ListeClientSelection) { //Remplir le grille des branchement avec(jointure entre branchement et client) //Activation de busy indictor //busyIndicatorBranchement.IsBusy = true; //Handle Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); //int handler = LoadingManager.BeginLoading("Recuperation des factures ..."); service.GetBranchementBTAControleAsync(ListeClientSelection); service.GetBranchementBTAControleCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { //bool Exist = false; CleanAllBranchement(); List <Galatee.Silverlight.ServiceRecouvrement.CsBrt> LISTEBRANCHEMENT = res.Result; ((Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO)dgCampagne.SelectedItem).ListElementsCamp = new List <ServiceRecouvrement.CsElementsDeCampagneBTA>(); foreach (var item in LISTEBRANCHEMENT) { Galatee.Silverlight.ServiceRecouvrement.CsElementsDeCampagneBTA ElementsDeCampagneBTA = new ServiceRecouvrement.CsElementsDeCampagneBTA(); ElementsDeCampagneBTA.Campagne_ID = ((Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO)dgCampagne.SelectedItem).Campagne_ID; ElementsDeCampagneBTA.Contrat_ID = item.PK_ID; ElementsDeCampagneBTA.DateCreation = DateTime.Now; ElementsDeCampagneBTA.MatriculeAgentCreation = UserConnecte.matricule; ElementsDeCampagneBTA.DateSelection = DateTime.Now; ElementsDeCampagneBTA.ReferenceClient = item.CLIENT; ElementsDeCampagneBTA.Nom = item.NOMABON; ElementsDeCampagneBTA.Libelle_Centre = item.CENTRE; ((Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO)dgCampagne.SelectedItem).ListElementsCamp.Add(ElementsDeCampagneBTA); } dgbranchement.ItemsSource = ((Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO)dgCampagne.SelectedItem).ListElementsCamp; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } //LoadingManager.EndLoading(handler); } catch (Exception) { throw; } }; //Desactivation du busy indicator //busyIndicatorBranchement.IsBusy = false; }
private void SaveCampagne() { ////Association de campagne à liste de branchement selection Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Traitement de données ..."); //List<Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO> listecampageneTosave = (List<Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO>)dgCampagne.ItemsSource; List <Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO> listecampageneTosave = new List <Galatee.Silverlight.ServiceRecouvrement.CsCampagnesBTAAccessiblesParLUO>(); listecampageneTosave.Add(this.camp_select); //service.SaveCampagneElementAsync(listecampageneTosave, new CsREFMETHODEDEDETECTIONCLIENTSBTA(), ""); service.SaveCampagneElementAsync(listecampageneTosave); service.SaveCampagneElementCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != false) { Message.Show("Modification enrégistrer avec succès", "Erreur"); InitialisationFraude(); //SessionObject.campagne.Clear(); //SessionObject.campagne = listecampageneTosave; //CallServiceToLoadCamp(); } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception) { throw; } }; }
private void SaveAffection(List <Galatee.Silverlight.ServiceRecouvrement.CsRegCli> ListRegCliAffecter, int?ID_USER) { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.SaveAffectionCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == false) { Message.ShowInformation("L'affectation ne s'est pas correctement effectuée veuillez reprendre l'opération", "Recouvrement"); } Message.ShowInformation("Affectation effectuée avec succès", "Recouvrement"); return; }; service.SaveAffectionAsync(ListRegCliAffecter, ID_USER); }
public void LoadTypeTarif() { List <Galatee.Silverlight.ServiceRecouvrement.CsTypeTarif> ListeTarif = new List <Galatee.Silverlight.ServiceRecouvrement.CsTypeTarif>(); //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des Types Tarif ..."); service.GetTypeTarifAsync(); service.GetTypeTarifCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else { if (res.Result != null) { ListeTarif = res.Result; cbxtarif.DisplayMemberPath = "LIBELLE"; cbxtarif.ItemsSource = ListeTarif; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } } catch (Exception) { throw; } }; cbxtarif.DisplayMemberPath = "LIBELLE"; cbxtarif.ItemsSource = ListeTarif; }
private void MiseAJourCategorie7() { try { prgBar.Visibility = Visibility.Visible; Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.MiseAJourCategorie7Completed += (s, args) => { prgBar.Visibility = Visibility.Collapsed; if ((args != null && args.Cancelled) || (args.Error != null)) { Message.ShowInformation("Erreur de la Mise à jour", "Resultat"); return; } if (args.Result != null && args.Result.Count() == 0) { Message.ShowInformation("Mise à jour effectuée avec succès", "Resultat"); this.DialogResult = true; } else { if (args.Result != null && args.Result.Count() > 0) { Message.ShowWarning("Mise à jour effectué ,mais les utilisateurs suivant non pas été pris en compte:\n" + string.Join(";", args.Result.ToArray()), "Resultat"); } else if (args.Result == null) { Message.ShowInformation("Mise à jour à échoué", "Resultat"); } } }; service.MiseAJourCategorie7Async(lines, UserConnecte.matricule); service.CloseAsync(); } catch (Exception) { throw; } }
public void LoadCampagne() { //if (SessionObject.campagne.Count() > 0) //{ // Load_Campagne(); //} //else //{ Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des factures ..."); service.GetCampagneBTAControleAsync(); service.GetCampagneBTAControleCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { Conteneur_listeCampagne = res.Result; Load_Campagne(); } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception) { throw; } }; //} }
public void LoadGroupeFacture() { List <Galatee.Silverlight.ServiceRecouvrement.CsGroupeDeFacturation> ListeGroupefacturation = new List <Galatee.Silverlight.ServiceRecouvrement.CsGroupeDeFacturation>(); //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des Groupes Facture ..."); service.GetGroupeFactureAsync(); service.GetGroupeFactureCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { ListeGroupefacturation = res.Result; //cbxgropfacture.DisplayMemberPath = "Libelle"; //cbxgropfacture.ItemsSource = ListeGroupefacturation; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception ex) { throw ex; } }; //cbxgropfacture.DisplayMemberPath = "Libelle"; //cbxgropfacture.ItemsSource = ListeGroupefacturation; }
public void LoadAgentZont() { List <Galatee.Silverlight.ServiceRecouvrement.CsReleveur> ListeReleveur = new List <Galatee.Silverlight.ServiceRecouvrement.CsReleveur>(); //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des Agents Zone ..."); service.GetAgentZontAsync(); service.GetAgentZontCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { ListeReleveur = res.Result; cbxagetzone.DisplayMemberPath = "NOMRELEVEUR"; cbxagetzone.ItemsSource = ListeReleveur; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception) { throw; } }; cbxagetzone.DisplayMemberPath = "MATRICULE"; cbxagetzone.ItemsSource = ListeReleveur; }
private void RechercheCompteur(string NumeroCompteur) { try { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient proxy = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); proxy.RechercheClientCompteurAsync(NumeroCompteur); proxy.RechercheClientCompteurCompleted += (ssn, args) => { if (args != null && args.Cancelled) { return; } if (args.Result != null && args.Result.Count != 0) { List <Galatee.Silverlight.ServiceRecouvrement.CsClientRechercher> _LstClient = new List <Galatee.Silverlight.ServiceRecouvrement.CsClientRechercher>(); _LstClient = args.Result; if (_LstClient != null && _LstClient.Count != 0) { dataGrid1.ItemsSource = null; dataGrid1.ItemsSource = _LstClient; dataGrid1.SelectedItem = _LstClient[0]; } else { Message.ShowInformation("Aucun client trouvé", "Info"); return; } } else { } }; proxy.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; return; }; service.RetourneCodeRegroupementAsync(); } catch (Exception ex) { throw ex; } }
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; } lstPia.AddRange(args.Result); return; }; service.RetournePIAAgenceAsync(CodeSite); service.CloseAsync(); } catch (Exception ex) { throw ex; } }
private void btn_Editer_Lot_Click(object sender, RoutedEventArgs e) { try { if (dg_lot.SelectedItem != null) { Galatee.Silverlight.ServiceRecouvrement.CstbLotsDeControleBTA Lot = (Galatee.Silverlight.ServiceRecouvrement.CstbLotsDeControleBTA)dg_lot.SelectedItem; Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des factures ..."); service.GetClienteBTADuLotControleAsync(Lot); service.GetClienteBTADuLotControleCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { Utility.ActionDirectOrientation <ServicePrintings.CsClient, ServiceRecouvrement.CsClient>(res.Result, null, SessionObject.CheminImpression, "ClientAControler", "Recouvrement", true); } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception) { throw; } }; } } catch (Exception ex) { Message.ShowError(ex, Galatee.Silverlight.Resources.Langue.errorTitle); } }
//public void LoadReleveur() //{ // //RpntServiceClient Service = new RpntServiceClient(); // RpntServiceClient service = new RpntServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Rpnt")); // int handler = LoadingManager.BeginLoading("Recuperation des factures ..."); // service.GetAgentZontAsync(); // service.GetAgentZontCompleted += (er, res) => // { // try // { // if (res.Error != null || res.Cancelled) // Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); // else // if (res.Result != null) // { // cbx_releveur.DisplayMemberPath = "MATRICULE"; // cbx_releveur.ItemsSource = res.Result; // } // else // Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", // "Erreur"); // LoadingManager.EndLoading(handler); // } // catch (Exception ex) // { // throw ex; // } // }; //} public void LoadTypeClient() { List <Galatee.Silverlight.ServiceAccueil.CsCategorieClient> ListeCategClient = new List <Galatee.Silverlight.ServiceAccueil.CsCategorieClient>(); if (SessionObject.LstCategorie.Count > 0) { ListeCategClient = SessionObject.LstCategorie; cbxtypeclient.DisplayMemberPath = "LIBELLE"; cbxtypeclient.ItemsSource = ListeCategClient; } else { //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des type de client ..."); service.GetTypeClientAsync(); service.GetTypeClientCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { foreach (var item in res.Result) { SessionObject.LstCategorie.Add(new Galatee.Silverlight.ServiceAccueil.CsCategorieClient { DATECREATION = item.DATECREATION, DATEMODIFICATION = item.DATEMODIFICATION, LIBELLE = item.LIBELLE, CODE = item.CODE, PK_ID = item.PK_ID, USERCREATION = item.USERCREATION, USERMODIFICATION = item.USERMODIFICATION }); } ListeCategClient = SessionObject.LstCategorie; cbxtypeclient.DisplayMemberPath = "LIBELLE"; cbxtypeclient.ItemsSource = ListeCategClient; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception ex) { throw ex; } }; } cbxtypeclient.DisplayMemberPath = "LIBELLE"; cbxtypeclient.ItemsSource = ListeCategClient; }
public void LoadClientEligible() { string CodeTypeClient = ""; string CodeTypeTarif = ""; string CodeTypeCompteur = ""; string CodeAgentZone = ""; string CodeGroupe = ""; string MoisDepart = ""; string CodeCentre = ""; string CodeMethode = ""; int FkiCentre = 0; try { if (cbxmethrech.SelectedItem != null) { CodeMethode = ((Galatee.Silverlight.ServiceRecouvrement.CsRefMethodesDeDetectionClientsBTA)cbxmethrech.SelectedItem).Methode_ID.ToString(); } else { Message.Show("Veuillez choisir une méthode de détection", "Info"); return; } if (Cbo_Centre.SelectedItem != null) { CodeCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).CODE; FkiCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).PK_ID; } else { Message.Show("Veuillez choisir un centre", "Info"); return; } if (cbxtypeclient.SelectedItem != null) { CodeTypeClient = ((Galatee.Silverlight.ServiceAccueil.CsCategorieClient)cbxtypeclient.SelectedItem).CODE.ToString(); } if (cbxtarif.SelectedItem != null) { CodeTypeTarif = ((Galatee.Silverlight.ServiceRecouvrement.CsTypeTarif)cbxtarif.SelectedItem).PK_ID.ToString(); } if (cbxagetzone.SelectedItem != null) { CodeAgentZone = ((Galatee.Silverlight.ServiceRecouvrement.CsReleveur)cbxagetzone.SelectedItem).MATRICULE; } if (cbxcompteur.SelectedItem != null) { CodeTypeCompteur = ((Galatee.Silverlight.ServiceRecouvrement.CsTcompteur)cbxcompteur.SelectedItem).PK_ID.ToString(); } #region Sylla 08/07/2016 if (cbxmethrech.SelectedItem != null) { var methrech = (Galatee.Silverlight.ServiceRecouvrement.CsRefMethodesDeDetectionClientsBTA)cbxmethrech.SelectedItem; //Si la méthode choisi est la methode de comparaison sur deux période if (methrech.Libele_Methode.Trim() == "Comparaison sur deux périodes".Trim()) { if (string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text) || string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text)) { Message.ShowWarning("Veillez saisir les deux périodes à comparer", "Avertissement"); return; } } else //Si la méthode choisi est la methode de comparaison sur plage de période if (methrech.Libele_Methode.Trim() == "Comparaison sur plage périodes".Trim()) { if (string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text) || string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text)) { Message.ShowWarning(" Veillez saisir la période de debut et de fin ", "Avertissement"); return; } } else //Si la méthode choisi est la methode de Recurence des cas if (methrech.Libele_Methode.Trim() == "Recurence des cas".Trim()) { if (string.IsNullOrWhiteSpace(txt_Code_Cas.Text) || 0 > NumUpD_Nombre_Recurence.Value || string.IsNullOrWhiteSpace(txt_Periode.Text)) { Message.ShowWarning(" Veillez choisir la période de départ, un cas et le nombre de recurence ", "Avertissement"); return; } MoisDepart = this.txt_Periode.Text; } else { if (!string.IsNullOrEmpty(txt_Periode.Text)) { MoisDepart = this.txt_Periode.Text; } else { Message.Show("Veuillez choisir la periode départ", "Info"); return; } } } #endregion //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des données ..."); service.GetClientEligibleAsync(CodeMethode, FkiCentre, CodeTypeClient, CodeTypeTarif, CodeTypeCompteur, CodeAgentZone, CodeGroupe, MoisDepart, txt_comparaison_periode1.Text, txt_comparaison_periode2.Text, txt_Code_Cas.Text, NumUpD_Nombre_Recurence.Value, NumUpD_Pourcentatge.Value); service.GetClientEligibleCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { foreach (var item in res.Result) { ListeClientEligible.Add(item); } dgClientEligible.ItemsSource = null; dgClientEligible.ItemsSource = ListeClientEligible; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception ex) { throw ex; } }; } catch (Exception ex) { Message.Show(ex.Message, "Erreur"); } }
public void LoadClientEligible() { string CodeTypeClient = ""; string CodeTypeTarif = ""; string CodeTypeCompteur = ""; string CodeAgentZone = ""; string CodeGroupe = ""; string MoisDepart = ""; string CodeCentre = ""; string CodeMethode = ""; int FkiCentre = 0; try { if (cbxmethrech.SelectedItem != null) { CodeMethode = ((Galatee.Silverlight.ServiceRecouvrement.CsRefMethodesDeDetectionClientsBTA)cbxmethrech.SelectedItem).Methode_ID.ToString(); } else { Message.Show("Veuillez choisir une méthode de détection", "Info"); return; } if (Cbo_Centre.SelectedItem != null) { CodeCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).CODE; FkiCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).PK_ID; } else { Message.Show("Veuillez choisir un centre", "Info"); return; } if (cbxtypeclient.SelectedItem != null) { CodeTypeClient = ((Galatee.Silverlight.ServiceAccueil.CsCategorieClient)cbxtypeclient.SelectedItem).CODE.ToString(); } if (cbxtarif.SelectedItem != null) { CodeTypeTarif = ((Galatee.Silverlight.ServiceRecouvrement.CsTypeTarif)cbxtarif.SelectedItem).PK_ID.ToString(); } if (!string.IsNullOrEmpty(txt_Periode.Text)) { MoisDepart = this.txt_Periode.Text; } else { Message.Show("Veuillez choisir une periode ", "Info"); return; } if (cbxagetzone.SelectedItem != null) { CodeAgentZone = ((Galatee.Silverlight.ServiceRecouvrement.CsReleveur)cbxagetzone.SelectedItem).MATRICULE; } if (cbxcompteur.SelectedItem != null) { CodeTypeCompteur = ((Galatee.Silverlight.ServiceRecouvrement.CsTcompteur)cbxcompteur.SelectedItem).PK_ID.ToString(); } //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des données ..."); service.GetClientEligibleAsync(CodeMethode, FkiCentre, CodeTypeClient, CodeTypeTarif, CodeTypeCompteur, CodeAgentZone, CodeGroupe, MoisDepart); service.GetClientEligibleCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { foreach (var item in res.Result) { ListeClientEligible.Add(item); } dgClientEligible.ItemsSource = null; dgClientEligible.ItemsSource = ListeClientEligible; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception ex) { throw ex; } }; } catch (Exception ex) { Message.Show(ex.Message, "Erreur"); } }
private void RemplirAffectation() { try { if (LstAffectation.Count != 0) { return; } else { Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); service.RemplirAffectationCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } LstAffectation = args.Result; return; }; service.RemplirAffectationAsync(); } } catch (Exception ex) { throw ex; } }