private void AjustementDeFondCaisse() { CaisseServiceClient srv = new CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse")); srv.AjustementDeFondCaisseCompleted += (ss, ee) => { try { if (ee.Cancelled || ee.Error != null || ee.Result == null) { string error = ee.Error.InnerException.ToString(); return; } Message.ShowError("Ajustement effectué avec succès", ""); } catch (Exception ex) { Message.ShowError(ex, Galatee.Silverlight.Resources.Caisse.Langue.errorTitle); } }; if (!string.IsNullOrEmpty(this.txtNumCaisse.Text) && !string.IsNullOrEmpty(this.txtFondNouveau.Text) && !string.IsNullOrEmpty(this.txtFondActuel.Text) && !string.IsNullOrEmpty(this.cbo_MoisComptable.SelectedValue.ToString())) { srv.AjustementDeFondCaisseAsync(this.txtNumCaisse.Text, (decimal.Parse(this.txtFondNouveau.Text) - decimal.Parse(this.txtFondActuel.Text)).ToString(), this.cbo_MoisComptable.SelectedValue.ToString(), UserConnecte.matricule); } }