public static Class_emploi_metier get_emploi_metier_by_id(int id) { Class_emploi_metier emploi = new Class_emploi_metier(); try { if (connection_x.State != ConnectionState.Open) { connection_x.Open(); } string query = "select m.emploi_metier from emploi_metier m where m.ID_emploi_metier = "; query += id.ToString(); SqlCommand command3 = new SqlCommand(query, connection_x); SqlDataReader reader = command3.ExecuteReader(); while (reader.Read()) { emploi.emploi_metier = reader[0].ToString(); } connection_x.Close(); } catch (Exception t) { MessageBox.Show(t.ToString()); } return(emploi); }
public void afficher_emploi_metier() { foreach (int i in emploi_ids) { Class_emploi_metier metier = Class_Database_app.get_emploi_metier_by_id(i); richTextBox_emploi_metier.Text += metier.emploi_metier + "\n"; } }
public void metirs_proc() { Class_emploi_metier x = new Class_emploi_metier(); x.emploi_metier = metroTextBox_add_emploi_visee_number1.Text; Program.new_candidat_to_add.son_emplois_metiers.Add(x); x = new Class_emploi_metier(); x.emploi_metier = metroTextBox_add_emploi_visee_number2.Text; Program.new_candidat_to_add.son_emplois_metiers.Add(x); x = new Class_emploi_metier(); x.emploi_metier = metroTextBox_add_emploi_visee_number3.Text; Program.new_candidat_to_add.son_emplois_metiers.Add(x); }