private void BtnValider_Click(object sender, EventArgs e) { if (checkBoxFonctionnel.Checked) { SFactory.GetServiceExigence().AddExigence(TextboxLabel.Text, 0, (comboBoxType.SelectedItem as dynamic).value, this.Owner.Tag.ToString()); } else { SFactory.GetServiceExigence().AddExigence(TextboxLabel.Text, 1, -1, this.Owner.Tag.ToString()); } this.Close(); }
private void button9_Click(object sender, EventArgs e) { string message = "Voulez-vous vraiment supprimer cette exigence ?"; string caption = "Suppression"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result; // Displays the MessageBox. result = MessageBox.Show(message, caption, buttons); if (result == System.Windows.Forms.DialogResult.Yes) { // Closes the parent form. SFactory.GetServiceExigence().DeleteExigence((GridExigence.CurrentRow.DataBoundItem as SBExigences).Id); } }
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { switch (tabControl1.SelectedTab.Name) { case "tabExigence": if (this.Tag != null) { List <SBExigences> LesExigence = SFactory.GetServiceExigence().GetExigencesByProjet(this.Tag.ToString()); SourceExigence.DataSource = LesExigence; GridExigence.DataSource = SourceExigence; } break; case "tabJalon": if (this.Tag != null) { List <SBJalon> LesJalons = SFactory.GetServiceJalon().GetJalons(); SourceJalon.DataSource = LesJalons; GridJalon.DataSource = SourceJalon; } break; case "tabTache": if (this.Tag != null) { List <SBTache> LesTache = SFactory.GetServiceTache().GetTaches(); SourceTache.DataSource = LesTache; GridTache.DataSource = SourceTache; } break; } }