public DetailMaintenance(int id) { InitializeComponent(); EmployeDAL RecupEmployes = new EmployeDAL(); dataGrid.ItemsSource = RecupEmployes.ListeDesEmployesParMaintenance(id); MaintenanceDAL ResumeMaintenance = new MaintenanceDAL(); List <Maintenance> DetailDeLaMaintenance = new List <Maintenance>(); DetailDeLaMaintenance = ResumeMaintenance.ReadMaintenance(id); this.idMaintenance = id; getId.Text = Convert.ToString(DetailDeLaMaintenance[0].Id_Maintenance); getTitre.Text = Convert.ToString(DetailDeLaMaintenance[0].Libelle); getDescription.Text = Convert.ToString(DetailDeLaMaintenance[0].Description); getDebut.Text = Convert.ToDateTime(DetailDeLaMaintenance[0].Date_Debut).ToString("dd/MM/yyyy"); getFin.Text = Convert.ToDateTime(DetailDeLaMaintenance[0].Date_Fin).ToString("dd/MM/yyyy"); getIncident.Text = Convert.ToString(DetailDeLaMaintenance[0].Id_Incident); }