public bool Insert(CsCoper cCoper) { try { return(Entities.InsertEntity <Galatee.Entity.Model.COPER>(Entities.ConvertObject <Galatee.Entity.Model.COPER, CsCoper>(cCoper))); } catch (Exception ex) { throw ex; } }
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); } }