private void btn_parties_Click(object sender, EventArgs e) { if (txt_code_conflit.Text == "") { MessageBox.Show("Choisissez le conflit auquel vous voulez ajouter des details!"); } else { var fr = new frm_details_parties_conflits(); fr.txt_num_conflit.Text = txt_code_conflit.Text; fr.ShowDialog(); } }
private void btn_enregistrer_Click(object sender, EventArgs e) { if (txt_code_conflit.Text == "") { MessageBox.Show("Veuillez completer les champs manquants"); } else { if (cbx_nature_conflit.Text == "" || cbx_type_conflit.Text == "" || txt_localite.Text == "") { MessageBox.Show("Completez les informations manquantes!"); } else { rps.inserer_conflit(txt_code_conflit.Text, metroDateTime1.Value, cbx_type_conflit.Text, cbx_nature_conflit.Text, txt_localite.Text); var fr = new frm_details_parties_conflits(); fr.txt_num_conflit.Text = txt_code_conflit.Text; fr.ShowDialog(); refresh(); } } }