예제 #1
0
파일: ProjectsForm.cs 프로젝트: slawer/skc
        /// <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);
                }
            }
        }
예제 #2
0
파일: ProjectsForm.cs 프로젝트: slawer/skc
        /// <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);
                }
            }
        }