private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { avtozapolnenie(checkBoxItem1.Checked); int selectedYear = int.Parse(comboBox1.Text); gosplan_detalsForm form = new gosplan_detalsForm(rep, negu, 0, selectedYear); if (form.ShowDialog() == DialogResult.OK) { LoadData(selectedYear); } }
private void EditRow() { if (dataGridViewX1.CurrentRow == null) { return; } int selectedYear = int.Parse(comboBox1.Text); int id = (int)(dataGridViewX1.CurrentRow.DataBoundItem as PlanDTO).Id; gosplan_detalsForm form = new gosplan_detalsForm(rep, negu, id, selectedYear); if (form.ShowDialog() == DialogResult.OK) { LoadData(selectedYear); } }