private void ShowCase_Click(object sender, EventArgs e) { if (cM == null) { cM = new CasesOfMission(Case); } cM.Show(); }
private void Case_SelectedValueChanged(object sender, EventArgs e) { if (cM == null) { cM = new CasesOfMission(Case); } if (Case.SelectedValue != null) { cM.AddCase(Case.Text, int.Parse(Case.SelectedValue.ToString())); } cM.dataGridView1.UserDeletedRow -= DataGridView1_UserDeletedRow; cM.dataGridView1.UserDeletedRow += DataGridView1_UserDeletedRow; cM.dataGridView1.RowsAdded -= DataGridView1_RowsAdded; cM.dataGridView1.RowsAdded += DataGridView1_RowsAdded; }