コード例 #1
0
        void ChargerTauxMini(string code)
        {
            CaisseServiceClient service = new CaisseServiceClient(Utility.Protocole(), Utility.EndPoint("Caisse"));

            service.RetourneListeTa58Completed += (s, args) =>
            {
                if (args.Error != null && args.Cancelled)
                {
                    Message.ShowError("Erreur du serveur. Réessayer svp!", Langue.errorTitle);
                    return;
                }

                if (args.Result == null)
                {
                    Message.ShowError("Echec lors de la récupération du taux minimal.Réessayer svp!", Langue.errorTitle);
                    return;
                }

                try
                {
                    Txt_NumeroDemande.IsEnabled = true;
                    CsParametresGeneraux _LeParametre = args.Result;
                    _LetauxMinimal = int.Parse(_LeParametre.LIBELLE);
                }
                catch (Exception ex)
                {
                    Message.ShowError(ex, Langue.errorTitle);
                }
            };
            service.RetourneListeTa58Async(code);
        }
コード例 #2
0
        private void cbo_Operation_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                CsCoper _OperationSelectionner = new CsCoper();
                _OperationSelectionner = (CsCoper)this.cbo_Operation.SelectedItem;
                if (_OperationSelectionner == null)
                {
                    return;
                }

                this.txt_RefClient.Text = string.Empty;
                this.txt_montant.Text   = string.Empty;
                this.txt_NomClient.Text = string.Empty;
                this.txt_IdCard.Text    = string.Empty;
                if (_OperationSelectionner.CODE == SessionObject.Enumere.CoperOdDFA)
                {
                    this.txt_RefClient.IsEnabled = false;
                    this.txt_montant.IsEnabled   = false;

                    this.txt_RefClient.Text = "00100000000000000001";
                    if (string.IsNullOrEmpty(MontantDeposit))
                    {
                        CaisseServiceClient service2 = new CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint(this));
                        service2.RetourneListeTa58Completed += (send, es) =>
                        {
                            if (es.Cancelled || es.Error != null || es.Result == null)
                            {
                                Message.ShowError("Erreur d'invocation du service. Veuillez réessayer svp !", Langue.errorTitle);
                                return;
                            }

                            try
                            {
                                MontantDeposit        = es.Result.LIBELLE;
                                this.txt_montant.Text = MontantDeposit;
                                this.txt_NomClient.Focus();
                            }
                            catch (Exception ex)
                            {
                                Message.ShowError(ex, Langue.errorTitle);
                            }
                        };
                        service2.RetourneListeTa58Async(SessionObject.Enumere.MontantFraisTravaux);
                    }
                    else
                    {
                        this.txt_montant.Text = MontantDeposit;
                        this.txt_NomClient.Focus();
                    }
                }
                else
                {
                    this.txt_RefClient.IsEnabled = true;
                    this.txt_montant.IsEnabled   = true;

                    this.txt_RefClient.Text = string.Empty;
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex, Langue.errorTitle);
            }
        }