private void buttonAddProject_Click(object sender, EventArgs e) { EditProject AddProjectForm = new EditProject(null); AddProjectForm.Owner = this; AddProjectForm.ShowDialog(); }
private void buttonEditProject_Click(object sender, EventArgs e) { //Передаем данные строки в поля формы string[] sample = new string[dataGridViewProjects.CurrentRow.Cells.Count]; for (int i = 0; i < dataGridViewProjects.CurrentRow.Cells.Count; i++) { sample[i] = dataGridViewProjects.CurrentRow.Cells[i].Value.ToString(); } EditProject EditProjectForm = new EditProject(sample); EditProjectForm.Owner = this; EditProjectForm.ShowDialog(); }