private void Button_Click_3(object sender, RoutedEventArgs e) { EvaluationServiceClient client = new EvaluationServiceClient(); string l = ((ServiceReferenceEval.CritereEvaluation)CombCrit.SelectedItem).Libelle; // Recuperation de l'objet selectionne dans le combobox ServiceReferenceEval.CritereEvaluation c = client.Find(l); int i = client.Modify(TBcr.Text, c.Id); }
private void Button_Click(object sender, RoutedEventArgs e) { if (!GridIndic.IsEnabled) { try { EvaluationServiceClient client = new EvaluationServiceClient(); ServiceReferenceEval.CritereEvaluation critere = new ServiceReferenceEval.CritereEvaluation(); critere.Libelle = TBcrit.Text; critere = client.Add(critere); MessageBox.Show("Critere d'evaluation enregistrer"); } catch (Exception) { throw; } } else { EvaluationServiceClient client1 = new EvaluationServiceClient(); IndicateurServiceClient client2 = new IndicateurServiceClient(); ServiceReferenceEval.CritereEvaluation c = new ServiceReferenceEval.CritereEvaluation(); ServiceReferenceIndic.Indicateur i = new ServiceReferenceIndic.Indicateur(); c.Libelle = TBcrit.Text; c = client1.Add(c); i.Libelle = TBlib.Text; i = client2.Add(i); //note.N = Convert.ToInt32(NoteTB.Text); // note.IdM = ((ServiceReferenceClasse.Matiere)CombMat.SelectedItem).IdM; //note.IdE = ((ServiceReferenceEtudiant.Etudiant)CombEt.SelectedItem).IdE; //note = client.Add(note); MessageBox.Show("Note enregistree avec succes !"); } }