/// <summary> /// редактируем роект /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditProject_Click(object sender, EventArgs e) { if (treeViewProjects.SelectedNode != null) { TreeNode selected = treeViewProjects.SelectedNode; Project prj = selected.Tag as Project; if (prj != null) { EditProjectForm frm = new EditProjectForm(); frm.ProjectPlace = prj.Place; frm.ProjectBush = prj.Bush; frm.ProjectWell = prj.Well; frm.ProjectJob = prj.Job; if (frm.ShowDialog(this) == DialogResult.OK) { prj.Place = frm.ProjectPlace; prj.Bush = frm.ProjectBush; prj.Well = frm.ProjectWell; prj.Job = frm.ProjectJob; UpdateProjectTree(); } } else { MessageBox.Show(this, "Выберите работу и повторите попытку", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }