private void изменитьToolStripMenuItem1_Click(object sender, EventArgs e) { if (dataGridView3.CurrentRow.Tag != null) { var id = Convert.ToInt32(dataGridView3.CurrentRow.Tag); using (UserContext db = new UserContext(Settings.constr)) { var item = db.DynamicConstants.FirstOrDefault(x => x.ID == id); CalculationDynamicForm f = new CalculationDynamicForm(this, 2, item); f.ShowDialog(); } } }
private void добавитьToolStripMenuItem1_Click(object sender, EventArgs e) { CalculationDynamicForm f = new CalculationDynamicForm(this, 1, null); f.ShowDialog(); }