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); }
private void AfficherImpayes() { try { this.Lsv_ListFacture.ItemsSource = null; if (this.Txt_LibelleCentre.Tag != null) { _UnClient.CENTRE = ((ServiceAccueil.CsCentre) this.Txt_LibelleCentre.Tag).CODE; _UnClient.REFCLIENT = this.txtReferenceClient.Text; _UnClient.ORDRE = this.txtOrdeClient.Text; _UnClient.FK_IDCENTRE = ((ServiceAccueil.CsCentre) this.Txt_LibelleCentre.Tag).PK_ID; } else { Message.ShowInformation("Sélectionnez le centre", "Index"); return; } prgBar.Visibility = System.Windows.Visibility.Visible; RecouvrementServiceClient client = new RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); client.RetourneListeFactureNonSoldeCaisseAsync(_UnClient); client.RetourneListeFactureNonSoldeCaisseCompleted += (s, args) => { prgBar.Visibility = System.Windows.Visibility.Collapsed; if (args != null && args.Cancelled) { return; } if (args.Result == null || args.Result.Count == 0) { Message.ShowInformation("Ce client n'existe pas", "Rendeez-vous"); return; } List <CsLclient> lstFactureDuClient = args.Result; lstFactureDuClient.ForEach(t => t.REFEMNDOC = t.REFEM); List <CsClient> LstClientDeLaReference = MethodeGenerics.RetourneClientFromFacture(lstFactureDuClient); lstFactureDuClient.ForEach(t => t.REFEM = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(t.REFEM)); foreach (var item in lstFactureDuClient) { item.MONTANTPAYPARTIEL = item.MONTANT - item.SOLDEFACTURE; if (item.MONTANTPAYPARTIEL < 0) { item.MONTANTPAYPARTIEL = 0; } } lstFactureDuClient.ForEach(t => t.MONTANTPAYPARTIEL = t.MONTANT - t.SOLDEFACTURE); this.Txt_SoldeClient.Text = lstFactureDuClient.Sum(t => t.SOLDEFACTURE).Value.ToString(SessionObject.FormatMontant); _UnClient.PK_ID = lstFactureDuClient.First().FK_IDCLIENT; Lsv_ListFacture.ItemsSource = null; Lsv_ListFacture.ItemsSource = lstFactureDuClient.Where(t => t.FK_IDCLIENT == lstFactureDuClient.First().FK_IDCLIENT); }; client.CloseAsync(); } catch (Exception ex) { Message.ShowError(ex.Message, "Rendez-vous"); } }
private void RenseignerInformationsAbonnement(CsDemande laDemande) { try { if (laDemande != null && laDemande.Abonne != null && laDemande.Abonne != null) { this.Txt_CodePuissanceUtilise.Text = laDetailDemande.Branchement.PUISSANCEINSTALLEE.ToString(); this.Txt_CodeTarif.Text = !string.IsNullOrEmpty(laDetailDemande.Abonne.TYPETARIF) ? laDetailDemande.Abonne.TYPETARIF : string.Empty; this.Txt_CodePussanceSoucrite.Text = !string.IsNullOrEmpty(laDetailDemande.Abonne.PUISSANCE.Value.ToString()) ? laDetailDemande.Abonne.PUISSANCE.Value.ToString() : string.Empty; if (laDetailDemande.Abonne.PUISSANCE != null) { this.Txt_CodePussanceSoucrite.Text = Convert.ToDecimal(laDetailDemande.Abonne.PUISSANCE.ToString()).ToString("N2"); } if (laDetailDemande.Abonne.PUISSANCEUTILISEE != null) { this.Txt_CodePuissanceUtilise.Text = Convert.ToDecimal(laDetailDemande.Abonne.PUISSANCEUTILISEE.Value).ToString("N2"); } this.Txt_CodeRistoune.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.RISTOURNE.ToString()) ? string.Empty : Convert.ToDecimal(laDetailDemande.Abonne.RISTOURNE.Value).ToString("N2"); this.Txt_CodeForfait.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.FORFAIT) ? string.Empty : laDetailDemande.Abonne.FORFAIT; this.Txt_LibelleForfait.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.LIBELLEFORFAIT) ? string.Empty : laDetailDemande.Abonne.LIBELLEFORFAIT; this.Txt_CodeTarif.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.TYPETARIF) ? string.Empty : laDetailDemande.Abonne.TYPETARIF; this.Txt_LibelleTarif.Text = !string.IsNullOrEmpty(laDetailDemande.Abonne.LIBELLETARIF) ? laDetailDemande.Abonne.LIBELLETARIF : string.Empty; this.Txt_CodeFrequence.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.PERFAC) ? string.Empty : laDetailDemande.Abonne.PERFAC; this.Txt_LibelleFrequence.Text = !string.IsNullOrEmpty(laDetailDemande.Abonne.LIBELLEFREQUENCE) ? laDetailDemande.Abonne.LIBELLEFREQUENCE : string.Empty; this.Txt_CodeMoisIndex.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.MOISREL) ? string.Empty : laDetailDemande.Abonne.MOISREL; this.Txt_LibelleMoisIndex.Text = !string.IsNullOrEmpty(laDetailDemande.Abonne.LIBELLEMOISIND) ? laDetailDemande.Abonne.LIBELLEMOISIND : string.Empty; this.Txt_CodeMoisFacturation.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.MOISFAC) ? string.Empty : laDetailDemande.Abonne.MOISFAC; this.Txt_LibMoisFact.Text = !string.IsNullOrEmpty(laDetailDemande.Abonne.LIBELLEMOISFACT) ? laDetailDemande.Abonne.LIBELLEMOISFACT : string.Empty; this.Txt_DateAbonnement.Text = (laDetailDemande.Abonne.DABONNEMENT == null) ? DateTime.Now.ToShortDateString() : Convert.ToDateTime(laDetailDemande.Abonne.DABONNEMENT.Value).ToShortDateString(); this.Chk_IsExonneration.IsChecked = (laDetailDemande.Abonne.ESTEXONERETVA == true) ? true : false; this.txt_DebutExoneration.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.DEBUTEXONERATIONTVA) ? string.Empty : ClasseMEthodeGenerique.FormatPeriodeMMAAAA(laDetailDemande.Abonne.DEBUTEXONERATIONTVA); this.txt_FinExoneration.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.FINEXONERATIONTVA) ? string.Empty : ClasseMEthodeGenerique.FormatPeriodeMMAAAA(laDetailDemande.Abonne.FINEXONERATIONTVA); AfficherOuMasquer(tabItemAbonnement, true); } else { AfficherOuMasquer(tabItemAbonnement, false); } } catch (Exception ex) { throw ex; } }
private void RemplireOngletEvenement(CsEvenement _leDernierEvt) { if (!string.IsNullOrEmpty(_leDernierEvt.PERIODE)) { this.Txt_periodeFactureF.Text = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_leDernierEvt.PERIODE); } this.Txt_IndexFacture.Text = string.IsNullOrEmpty(_leDernierEvt.INDEXEVT.ToString()) ? string.Empty : _leDernierEvt.INDEXEVT.ToString(); this.Txt_ConsoFacture.Text = string.IsNullOrEmpty(_leDernierEvt.CONSO.ToString()) ? string.Empty : _leDernierEvt.CONSO.ToString(); this.Txt_CasFacture.Text = string.IsNullOrEmpty(_leDernierEvt.CAS) ? string.Empty : _leDernierEvt.CAS; Txt_DateFacture.Text = _leDernierEvt.DATEEVT == null ? string.Empty : _leDernierEvt.DATEEVT.Value.ToShortDateString(); }
private void ChargerCompteDeResiliation(CsClient _UnClient) { try { AcceuilServiceClient client = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); client.ChargerCompteDeResiliationCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null || args.Result.Count == 0) { Message.ShowInformation("Ce client n'existe pas", "Demande"); return; } lstFactureDuClient = new List <CsLclient>(); lstFactureDuClient = args.Result; lstFactureDuClient.ForEach(t => t.REFEM = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(t.REFEM)); if (lstFactureDuClient != null && lstFactureDuClient.Count != 0) { AfficherOuMasquer(tabItemCompte, true); dtg_CompteClient.ItemsSource = lstFactureDuClient; //Txt_TotalSoldeResil.Text = lstFactureDuClient.Sum(t => t.SOLDEFACTURE).Value.ToString(SessionObject.FormatMontant); Txt_TotalSoldeResil.Text = lstFactureDuClient.First().SOLDEFACTURE.Value.ToString(SessionObject.FormatMontant); //if (lstFactureDuClient.Sum(t => t.SOLDEFACTURE) >= 0) if (lstFactureDuClient.First().SOLDEFACTURE >= 0) { Message.ShowInformation("Aucun remboursement prevu pour ce client", "Demande"); this.OKButton.IsEnabled = false; return; } this.OKButton.IsEnabled = true; } }; client.ChargerCompteDeResiliationAsync(_UnClient); client.CloseAsync(); } catch (Exception ex) { Message.ShowError("Erreur au chargement des cout", "Demande"); } }
private void RemplireOngletEvenement(CsCanalisation _LeEvtSelect, CsEvenement _leDernierEvt) { if (!string.IsNullOrEmpty(_leDernierEvt.DERPERF)) { this.Txt_periodeFactureF.Text = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_leDernierEvt.DERPERF); } if (!string.IsNullOrEmpty(_leDernierEvt.DERPERFN)) { this.Txt_periodeFactureN.Text = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_leDernierEvt.DERPERFN); } this.Txt_IndexFacture.Text = string.IsNullOrEmpty(_leDernierEvt.INDEXEVT.ToString()) ? string.Empty : _leDernierEvt.INDEXEVT.ToString(); this.Txt_ConsoFacture.Text = string.IsNullOrEmpty(_leDernierEvt.CONSO.ToString()) ? string.Empty : _leDernierEvt.CONSO.ToString(); this.Txt_CasFacture.Text = string.IsNullOrEmpty(_leDernierEvt.CAS) ? string.Empty : _leDernierEvt.CAS; this.Txt_Quantite.Text = string.IsNullOrEmpty(_leDernierEvt.CONSOFAC.ToString()) ? string.Empty : _leDernierEvt.CONSOFAC.ToString(); this.Txt_Quantite.IsReadOnly = true; }
private void ChargerCompteDeResiliation(CsClient _UnClient) { AcceuilServiceClient client = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); client.ChargerCompteDeResiliationCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null || args.Result.Count == 0) { //Message.ShowInformation("Ce client n'existe pas", "Demande"); //return; Message.ShowInformation("Ce client n'a pas d'avance positionnée.\nVeuillez vérifier l'abonnement .", "Acceuil"); this.OKButton.IsEnabled = false; // return; } List <CsLclient> lstFactureDuClient = args.Result; if (lstFactureDuClient != null && lstFactureDuClient.Count != 0) { lstFactureDuClient.ForEach(t => t.REFEM = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(t.REFEM)); AfficherOuMasquer(tabItemCompte, true); dtg_CompteClient.ItemsSource = lstFactureDuClient; //Txt_TotalSoldeResil.Text = lstFactureDuClient.Sum(t => t.SOLDEFACTURE).Value.ToString(SessionObject.FormatMontant); Txt_TotalSoldeResil.Text = lstFactureDuClient.First().SOLDEFACTURE.Value.ToString(SessionObject.FormatMontant); //if (lstFactureDuClient.Sum(t => t.SOLDEFACTURE) >= 0) //{ // Message.ShowInformation("Aucun remboursement pour ce client car le solde est supperieur a 0", "Demande"); // this.OKButton.IsEnabled = false; // return; //} this.OKButton.IsEnabled = true; } }; client.ChargerCompteDeResiliationAsync(_UnClient); client.CloseAsync(); }
private void RemplireOngletEvenement(CsCanalisation _LeEvtSelect, CsEvenement _leDernierEvt) { //LaDemande.DRES = DateResil; //this.Txt_PeriodeEnCour.Text = (!string.IsNullOrEmpty(LaDemande.DRES)) ? LaDemande.DRES.Substring(3, 7) : string.Empty; //if (string.IsNullOrEmpty(this.Txt_PeriodeEnCour.Text)) //this.Txt_PeriodeEnCour.Text = (!string.IsNullOrEmpty(LaDemande.PERIODE)) ? LaDemande.PERIODE : string.Empty; //this.Txt_point.Text = _LeEvtSelect.POINT.ToString(); if (!string.IsNullOrEmpty(_leDernierEvt.DERPERF)) { this.Txt_periodeFactureF.Text = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_leDernierEvt.DERPERF); } if (!string.IsNullOrEmpty(_leDernierEvt.DERPERFN)) { this.Txt_periodeFactureN.Text = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_leDernierEvt.DERPERFN); } this.Txt_IndexFacture.Text = string.IsNullOrEmpty(_leDernierEvt.INDEXEVT.ToString()) ? string.Empty : _leDernierEvt.INDEXEVT.ToString(); this.Txt_ConsoFacture.Text = string.IsNullOrEmpty(_leDernierEvt.CONSO.ToString()) ? string.Empty : _leDernierEvt.CONSO.ToString(); this.Txt_CasFacture.Text = string.IsNullOrEmpty(_leDernierEvt.CAS) ? string.Empty : _leDernierEvt.CAS; }
//private void AjouterPeriodeDePlage() //{ // List<string> Plageperiode = new List<string>(); // string Debut=ClasseMEthodeGenerique.FormatPeriodeAAAAMM(txt_periode_Debut.Text); // string Fin=ClasseMEthodeGenerique.FormatPeriodeAAAAMM(txt_periode_Fin.Text); // RecupererPeriodeDePlage(Debut, Fin); //} private void AjouterPeriodeDePlage() { List <string> Plageperiode = new List <string>(); //string Debut = ClasseMEthodeGenerique.FormatPeriodeAAAAMM(txt_periode_Debut.Text); //string Fin = ClasseMEthodeGenerique.FormatPeriodeAAAAMM(txt_periode_Fin.Text); Char delimiter = '/'; int AnneDepart = int.Parse(txt_periode_Debut.Text.Split(delimiter).Last()); int MoisDepart = int.Parse(txt_periode_Debut.Text.Split(delimiter).First()); int AnneFin = int.Parse(txt_periode_Fin.Text.Split(delimiter).Last()); int MoisFin = int.Parse(txt_periode_Fin.Text.Split(delimiter).First()); //var PeriodeDebut = int.Parse(Debut); //var Periodefin = int.Parse(Fin); for (int i = MoisDepart; (AnneDepart <= AnneFin); i++) { if (i <= 12) { Plageperiode.Add(AnneDepart.ToString("0000") + i.ToString("00")); } else { i = 0; AnneDepart++; } if (i == MoisFin && AnneDepart == AnneFin) { break; } } lbx_Periode.Items.Clear(); foreach (var p in Plageperiode.OrderBy(p => p)) { var periode = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(p); lbx_Periode.Items.Add(periode); } //RecupererPeriodeDePlage(Debut, Fin); }
private void AfficherInfoAbonnement(CsDemande _NouvelDemande, CsDemande _LeAncdemande) { try { CsAbon _LeAbonnementdemande = _LeAncdemande.Abonne; CsAbon _NouvelInfoAbon = _NouvelDemande.Abonne; this.Txt_CodeCentre.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.CENTRE) ? string.Empty : laDetailDemande.LaDemande.CENTRE; this.Txt_LibelleCentre.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.LIBELLECENTRE) ? string.Empty : laDetailDemande.LaDemande.LIBELLECENTRE; this.Txt_CodeProduit.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.PRODUIT) ? string.Empty : laDetailDemande.LaDemande.PRODUIT; this.Txt_LibelleProduit.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.LIBELLEPRODUIT) ? string.Empty : laDetailDemande.LaDemande.LIBELLEPRODUIT; this.Txt_NumDemande.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.NUMDEM) ? string.Empty : laDetailDemande.LaDemande.NUMDEM; this.Txt_Client.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.CLIENT) ? string.Empty : laDetailDemande.LaDemande.CLIENT; this.Txt_Ordre.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.ORDRE) ? string.Empty : laDetailDemande.LaDemande.ORDRE; if (_LeAbonnementdemande != null) { if (_LeAbonnementdemande.PUISSANCE != null) { this.Txt_CodePussanceSoucrite.Text = Convert.ToDecimal(_LeAbonnementdemande.PUISSANCE.ToString()).ToString("N2"); } if (_LeAncdemande.Branchement != null && _LeAncdemande.Branchement.PUISSANCEINSTALLEE != null) { this.Txt_CodePuissanceUtilise.Text = Convert.ToDecimal(_LeAncdemande.Branchement.PUISSANCEINSTALLEE).ToString("N2"); } this.Txt_CodeForfait.Text = string.IsNullOrEmpty(_LeAbonnementdemande.FORFAIT) ? string.Empty : _LeAbonnementdemande.FORFAIT; this.Txt_LibelleForfait.Text = string.IsNullOrEmpty(_LeAbonnementdemande.LIBELLEFORFAIT) ? string.Empty : _LeAbonnementdemande.LIBELLEFORFAIT; this.Txt_CodeTarif.Text = string.IsNullOrEmpty(_LeAbonnementdemande.TYPETARIF) ? string.Empty : _LeAbonnementdemande.TYPETARIF; this.Txt_LibelleTarif.Text = string.IsNullOrEmpty(_LeAbonnementdemande.LIBELLETARIF) ? string.Empty : _LeAbonnementdemande.LIBELLETARIF; this.Txt_CodeFrequence.Text = string.IsNullOrEmpty(_LeAbonnementdemande.PERFAC) ? string.Empty : _LeAbonnementdemande.PERFAC; this.Txt_LibelleFrequence.Text = string.IsNullOrEmpty(_LeAbonnementdemande.LIBELLEFREQUENCE) ? string.Empty : _LeAbonnementdemande.LIBELLEFREQUENCE; this.Txt_CodeMoisFacturation.Text = string.IsNullOrEmpty(_LeAbonnementdemande.MOISFAC) ? string.Empty : _LeAbonnementdemande.MOISFAC; this.Txt_LibMoisFact.Text = string.IsNullOrEmpty(_LeAbonnementdemande.LIBELLEMOISFACT) ? string.Empty : _LeAbonnementdemande.LIBELLEMOISFACT; this.Txt_DateAbonnement.Text = (_LeAbonnementdemande.DABONNEMENT == null) ? string.Empty : Convert.ToDateTime(_LeAbonnementdemande.DABONNEMENT.Value).ToShortDateString(); this.Txt_DateResiliation.Text = (_LeAbonnementdemande.DRES == null) ? string.Empty : Convert.ToDateTime(_LeAbonnementdemande.DRES.Value).ToShortDateString(); this.txt_DebutPeriodeExo.Text = string.IsNullOrEmpty(_LeAbonnementdemande.DEBUTEXONERATIONTVA) ? string.Empty : ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_LeAbonnementdemande.DEBUTEXONERATIONTVA); this.txt_FinPeriodeExo.Text = string.IsNullOrEmpty(_LeAbonnementdemande.FINEXONERATIONTVA) ? string.Empty : ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_LeAbonnementdemande.FINEXONERATIONTVA); this.chk_EstBornePoste.IsChecked = (_LeAbonnementdemande.ISBORNEPOSTE != null && _LeAbonnementdemande.ISBORNEPOSTE.Value) ? true : false; this.Txt_AvanceSurConso.Text = _LeAbonnementdemande.AVANCE == null ? "0" : Convert.ToDecimal(_LeAbonnementdemande.AVANCE.Value).ToString(SessionObject.FormatMontant); this.Txt_TypeComptage.Text = string.IsNullOrEmpty(_LeAbonnementdemande.LIBELLETYPECOMPTAGE) ? string.Empty : _LeAbonnementdemande.LIBELLETYPECOMPTAGE; if (_LeAncdemande.LeClient != null) { this.Txt_AncCodeCategorie.Text = string.IsNullOrEmpty(_LeAncdemande.LeClient.CATEGORIE) ? string.Empty : _LeAncdemande.LeClient.CATEGORIE; this.Txt_AncLibelleCategorie.Text = string.IsNullOrEmpty(_LeAncdemande.LeClient.LIBELLECATEGORIE) ? string.Empty : _LeAncdemande.LeClient.LIBELLECATEGORIE; } } if (_NouvelInfoAbon != null) { if (_NouvelInfoAbon.PUISSANCE != null) { this.Txt_NouvCodePussanceSoucrite.Text = Convert.ToDecimal(_NouvelInfoAbon.PUISSANCE.ToString()).ToString("N2"); } if (_NouvelDemande.Branchement != null && _NouvelDemande.Branchement.PUISSANCEINSTALLEE != null) { this.Txt_NouvCodePuissanceUtilise.Text = Convert.ToDecimal(_NouvelDemande.Branchement.PUISSANCEINSTALLEE).ToString("N2"); } this.Txt_NouvCodeForfait.Text = string.IsNullOrEmpty(_NouvelInfoAbon.FORFAIT) ? string.Empty : _NouvelInfoAbon.FORFAIT; this.Txt_NouvLibelleForfait.Text = string.IsNullOrEmpty(_NouvelInfoAbon.LIBELLEFORFAIT) ? string.Empty : _NouvelInfoAbon.LIBELLEFORFAIT; this.Txt_NouvCodeTarif.Text = string.IsNullOrEmpty(_NouvelInfoAbon.TYPETARIF) ? string.Empty : _NouvelInfoAbon.TYPETARIF; this.Txt_NouvLibelleTarif.Text = string.IsNullOrEmpty(_NouvelInfoAbon.LIBELLETARIF) ? string.Empty : _NouvelInfoAbon.LIBELLETARIF; this.Txt_NouvCodeFrequence.Text = string.IsNullOrEmpty(_NouvelInfoAbon.PERFAC) ? string.Empty : _NouvelInfoAbon.PERFAC; this.Txt_NouvLibelleFrequence.Text = string.IsNullOrEmpty(_NouvelInfoAbon.LIBELLEFREQUENCE) ? string.Empty : _NouvelInfoAbon.LIBELLEFREQUENCE; this.Txt_NouvCodeMoisFacturation.Text = string.IsNullOrEmpty(_NouvelInfoAbon.MOISFAC) ? string.Empty : _NouvelInfoAbon.MOISFAC; this.Txt_NouvLibMoisFact.Text = string.IsNullOrEmpty(_NouvelInfoAbon.LIBELLEMOISFACT) ? string.Empty : _NouvelInfoAbon.LIBELLEMOISFACT; this.txt_NouvelleDebutPeriodeExo.Text = string.IsNullOrEmpty(_NouvelInfoAbon.DEBUTEXONERATIONTVA) ? string.Empty : ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_NouvelInfoAbon.DEBUTEXONERATIONTVA); this.txt_NouvelleFinPeriodeExo.Text = string.IsNullOrEmpty(_NouvelInfoAbon.FINEXONERATIONTVA) ? string.Empty : ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_NouvelInfoAbon.FINEXONERATIONTVA); this.chk_EstBornePoste.IsChecked = (_NouvelInfoAbon.ISBORNEPOSTE.Value) ? true : false; this.Txt_NouvDateAbonnement.Text = (_NouvelInfoAbon.DABONNEMENT == null) ? string.Empty : Convert.ToDateTime(_NouvelInfoAbon.DABONNEMENT.Value).ToShortDateString(); this.Txt_NouvDateResiliation.Text = (_NouvelInfoAbon.DRES == null) ? string.Empty : Convert.ToDateTime(_NouvelInfoAbon.DRES.Value).ToShortDateString(); this.Txt_NouvAvanceSurConso.Text = _NouvelInfoAbon.AVANCE == null ? "0" : Convert.ToDecimal(_NouvelInfoAbon.AVANCE.Value).ToString(SessionObject.FormatMontant); this.Txt_NouvTypeComptage.Text = string.IsNullOrEmpty(_NouvelInfoAbon.LIBELLETYPECOMPTAGE) ? string.Empty : _NouvelInfoAbon.LIBELLETYPECOMPTAGE; if (_NouvelDemande.LeClient != null) { this.Txt_Categorie.Text = string.IsNullOrEmpty(_NouvelDemande.LeClient.CATEGORIE) ? string.Empty : _NouvelDemande.LeClient.CATEGORIE; this.Txt_LibelleCategorie.Text = string.IsNullOrEmpty(_NouvelDemande.LeClient.LIBELLECATEGORIE) ? string.Empty : _NouvelDemande.LeClient.LIBELLECATEGORIE; } } if (laDetailDemande.ObjetScanne != null && laDetailDemande.ObjetScanne.Count != 0) { dgListePiece.ItemsSource = this.LstPiece; } if (this.Txt_NouvCodeTarif.Text != this.Txt_CodeTarif.Text) { this.Txt_NouvCodeTarif.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleTarif.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleTarif.FontStyle = FontStyles.Italic; this.Txt_NouvCodeTarif.FontStyle = FontStyles.Italic; } if (this.Txt_NouvCodeForfait.Text != this.Txt_CodeForfait.Text) { this.Txt_NouvCodeForfait.FontWeight = FontWeights.ExtraBold; this.Txt_NouvCodeForfait.FontWeight = FontWeights.ExtraBold; this.Txt_NouvCodeForfait.FontStyle = FontStyles.Italic; this.Txt_NouvLibelleTarif.FontStyle = FontStyles.Italic; } if (this.Txt_NouvCodeFrequence.Text != this.Txt_CodeFrequence.Text) { this.Txt_NouvCodeFrequence.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleFrequence.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleFrequence.FontStyle = FontStyles.Italic; this.Txt_NouvCodeFrequence.FontStyle = FontStyles.Italic; } if (this.Txt_NouvCodeMoisFacturation.Text != this.Txt_CodeMoisFacturation.Text) { this.Txt_NouvCodeMoisFacturation.FontWeight = FontWeights.Bold; this.Txt_NouvCodeMoisFacturation.FontStyle = FontStyles.Italic; this.Txt_NouvLibMoisFact.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibMoisFact.FontStyle = FontStyles.Italic; } if (this.Txt_NouvDateAbonnement.Text != this.Txt_DateAbonnement.Text) { this.Txt_NouvDateAbonnement.FontWeight = FontWeights.Bold; this.Txt_NouvDateAbonnement.FontStyle = FontStyles.Italic; } if (this.Txt_NouvDateResiliation.Text != this.Txt_DateResiliation.Text) { this.Txt_NouvDateResiliation.FontWeight = FontWeights.Bold; this.Txt_NouvDateResiliation.FontStyle = FontStyles.Italic; } if (this.Txt_NouvCodePussanceSoucrite.Text != this.Txt_CodePussanceSoucrite.Text) { this.Txt_NouvCodePussanceSoucrite.FontWeight = FontWeights.Bold; this.Txt_NouvCodePussanceSoucrite.FontStyle = FontStyles.Italic; } if (this.Txt_NouvCodePuissanceUtilise.Text != this.Txt_CodePuissanceUtilise.Text) { this.Txt_NouvCodePuissanceUtilise.FontWeight = FontWeights.Bold; this.Txt_NouvCodePuissanceUtilise.FontStyle = FontStyles.Italic; } if (this.txt_NouvelleDebutPeriodeExo.Text != this.txt_DebutPeriodeExo.Text) { this.txt_NouvelleDebutPeriodeExo.FontWeight = FontWeights.Bold; this.txt_NouvelleDebutPeriodeExo.FontStyle = FontStyles.Italic; } if (this.txt_NouvelleFinPeriodeExo.Text != this.txt_FinPeriodeExo.Text) { this.txt_NouvelleFinPeriodeExo.FontWeight = FontWeights.Bold; this.txt_NouvelleFinPeriodeExo.FontStyle = FontStyles.Italic; } if (this.Txt_NouvAvanceSurConso.Text != this.Txt_AvanceSurConso.Text) { this.Txt_NouvAvanceSurConso.FontWeight = FontWeights.Bold; this.Txt_NouvAvanceSurConso.FontStyle = FontStyles.Italic; } if (this.Txt_NouvTypeComptage.Text != this.Txt_TypeComptage.Text) { this.Txt_NouvTypeComptage.FontWeight = FontWeights.Bold; this.Txt_NouvTypeComptage.FontStyle = FontStyles.Italic; } if (this.Txt_Categorie.Text != this.Txt_AncCodeCategorie.Text) { this.Txt_Categorie.FontWeight = FontWeights.Bold; this.Txt_Categorie.FontStyle = FontStyles.Italic; this.Txt_LibelleCategorie.FontWeight = FontWeights.Bold; this.Txt_LibelleCategorie.FontStyle = FontStyles.Italic; } if (this.chk_EstBornePoste.IsChecked != this.chk_EstBornePosteNew.IsChecked) { this.chk_EstBornePosteNew.FontWeight = FontWeights.Bold; this.chk_EstBornePosteNew.FontStyle = FontStyles.Italic; } } catch (Exception ex) { throw ex; } }
private void ChargerCompteDeResiliation(CsClient _UnClient) { AcceuilServiceClient client = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil")); client.ChargerCompteDeResiliationCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } if (args.Result == null || args.Result.Count == 0) { return; } List <CsLclient> lstFactureDuClient = args.Result; lstFactureDuClient.ForEach(t => t.REFEM = (!string.IsNullOrEmpty(t.REFEM)? ClasseMEthodeGenerique.FormatPeriodeMMAAAA(t.REFEM):string.Empty)); if (lstFactureDuClient != null && lstFactureDuClient.Count != 0) { AfficherOuMasquer(tabItemCompteClient, true); dtg_CompteClient.ItemsSource = null; dtg_CompteClient.ItemsSource = lstFactureDuClient; lstFactureDuClient.ForEach(i => i.MONTANTPAYPARTIEL = ((i.MONTANT == null ? 0 : i.MONTANT) - (i.SOLDEFACTURE == null ? 0 : i.SOLDEFACTURE))); Txt_TotalSoldeResil.Text = lstFactureDuClient.Sum(t => t.SOLDEFACTURE).Value.ToString(SessionObject.FormatMontant); } }; client.ChargerCompteDeResiliationAsync(_UnClient); client.CloseAsync(); }
private void Btn_search_Click(object sender, RoutedEventArgs e) { if (this.Txt_Client.Text == string.Empty) { client = null; } else { client = this.Txt_Client.Text; } if (this.Txt_ordre.Text == string.Empty) { ordre = null; } else { ordre = this.Txt_ordre.Text; } if (this.Txt_Periode.Text == string.Empty) { periode = null; } else { periode = ClasseMEthodeGenerique.FormatPeriodeAAAAMM(this.Txt_Periode.Text);; } List <int> lstCentre = new List <int>(); List <string> lstPeriode = new List <string>(); foreach (ServiceAccueil.CsCentre item in lstCentreSelect) { lstCentre.Add(item.PK_ID); } foreach (string item in LstPeriode) { lstPeriode.Add(ClasseMEthodeGenerique.FormatPeriodeAAAAMM(item)); } // Affichage de l'indicateur de chargement dans l'arbre d'elements visuels int loaderHandler = LoadingManager.BeginLoading("Recupération de données ... "); FacturationServiceClient service = new FacturationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Facturation")); service.ListeDesClientPourEnvoieMailAsync(lstCentre, lstPeriode, chk_sms.IsChecked.Value, chk_email.IsChecked.Value); service.ListeDesClientPourEnvoieMailCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { LoadingManager.EndLoading(loaderHandler); throw new Exception("Cannot display report,voici l'erreur produit :" + res.Error + "(Requette annulé = " + res.Cancelled); } if (res.Result != null) { if (res.Result.Count > 0) { List <CsEnteteFacture> facturesAEnvoyer = res.Result; foreach (var item in facturesAEnvoyer) { item.PERIODE = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(item.PERIODE); } if (!string.IsNullOrEmpty(this.Txt_Client.Text) && !string.IsNullOrEmpty(this.Txt_ordre.Text)) { List <CsEnteteFacture> lstFactureClient = facturesAEnvoyer.Where(t => t.CLIENT == this.Txt_Client.Text && t.ORDRE == this.Txt_ordre.Text).ToList(); this.Dtg_factures.ItemsSource = lstFactureClient; } else { this.Dtg_factures.ItemsSource = facturesAEnvoyer; } return; } } Message.Show("Aucune données trouvé", "Information"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; }