Beispiel #1
0
        private void kategorieVerschiebenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if(tvMain.SelectedNode==null) return;
            TreeNode tnNode=tvMain.SelectedNode;
            if(tnNode.Tag==null) return;

            CustomTreeNodeData ctnData=(CustomTreeNodeData)tnNode.Tag;

            if(ctnData.Function==CustomTreeNodeData.enFunction.Category)
            {
                FormCategoryMover InstFormCategoryMover=new FormCategoryMover();
                InstFormCategoryMover.DocumentID=ctnData.ID;

                if(InstFormCategoryMover.ShowDialog(FormCategoryMover.MoveMode.enCategory)==DialogResult.OK)
                {
                    BuildTreeview();
                }
            }
            else
            {
                MessageBox.Show("Sie haben keine Kategorie selektiert!");
            }
        }
Beispiel #2
0
        private void dokumentInAndereKategorieVerschiebenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if(tvMain.SelectedNode==null) return;
            TreeNode tnNode=tvMain.SelectedNode;
            if(tnNode.Tag==null) return;

            CustomTreeNodeData ctnData=(CustomTreeNodeData)tnNode.Tag;

            if(ctnData.Function==CustomTreeNodeData.enFunction.Document)
            {
                FormCategoryMover InstFormCategoryMover=new FormCategoryMover();
                InstFormCategoryMover.DocumentID=ctnData.ID;

                if(InstFormCategoryMover.ShowDialog(FormCategoryMover.MoveMode.enDocument)==DialogResult.OK)
                {
                    TreeNode ParentCategory=tnNode.Parent;
                    RefreshDocumentChilds(ParentCategory); //Alte Sache

                    TreeNode newCatTreenode=FindTreeNodeFromID(tvMain.Nodes[0], InstFormCategoryMover.CategoryID);//Neue Sache
                    RefreshDocumentChilds(newCatTreenode);
                }
            }
            else
            {
                MessageBox.Show("Sie haben kein Dokument selektiert!");
            }
        }