private void Btn_Ajouter_Click(object sender, EventArgs e) { Ajouter_Surveillance AjoutSurv = new Ajouter_Surveillance( CurrentListSurv, CurrentEns); var result = AjoutSurv.ShowDialog(); if (result == DialogResult.OK) { Surveillances NewSurv = new Surveillances(AjoutSurv.CurrentSurveillance); CurrentListSurv.Add(NewSurv); /* * foreach (Surveillances Row in CurrentListSurv) * { * MessageBox.Show("Ens : " + Row.PropEnseignant.PropId + " " + Row.PropEnseignant.PropNom + " " + Row.PropEnseignant.PropPrenom + " " + Row.PropEnseignant.PropEmail + " " + Row.PropEnseignant.PropStatut + " " + Row.PropEnseignant.PropDepartements.PropCode + " " + Row.PropEnseignant.PropDepartements.PropNom + "\n\nSeance : " + Row.PropSeance.PropCode + " " + Row.PropSeance.PropNom + " " + Row.PropSeance.PropHeureDebut + " " + Row.PropSeance.PropHeureFin + "\n\nSalle : " + Row.PropSalle.PropNom + " " + Row.PropSalle.PropType + "\n\nDate : " + Row.PropDateSurveillance); + }*/ CurrentDataTableProgrammes.Rows.Add( NewSurv.PropSalle.PropNom, NewSurv.PropSeance.PropNom, NewSurv.PropSeance.PropHeureDebut, NewSurv.PropSeance.PropHeureFin, NewSurv.PropDateSurveillance ); IsUpdated = true; DtgListeProgrames.DataSource = CurrentDataTableProgrammes; } }
private void Btn_Ajouter_Click(object sender, EventArgs e) { Ajouter_Surveillance AjoutSurv = new Ajouter_Surveillance(); AjoutSurv.ShowDialog(); }