Example #1
0
        private void popupTreeModify_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                //this.EFMsgInfo = "";
                ES.FormESOBJ_TREEINS FormIns = new ES.FormESOBJ_TREEINS();
                FormIns.Icon = this.Icon;

                FormIns.Name = this.treeList.FocusedNode.Tag.ToString();//传递参数,将选择的节点作为新增的目录的父节点
                FormIns.Cursystem = comboApp.EditValue.ToString().Split(':')[0];//传递参数代表当前系统
                FormIns.Treeseq = this.treeList.FocusedNode.Nodes.Count;//传递参数,父节点的子节点数作为新增目录的顺序号
                FormIns.Description = this.treeList.FocusedNode.GetDisplayText(treeListColumn1).Split('(')[0];
                FormIns.Fname = this.treeList.FocusedNode.ParentNode.Tag.ToString();
                FormIns.Mode = 1;
                FormIns.Text = EP.EPES.EPESC0000177/*修改目录*/;
                FormIns.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
                DialogResult result = FormIns.ShowDialog();
                if (result == DialogResult.OK)
                {
                    //this.EFMsgInfo = EP.EPES.EPESC0000077/*执行成功*/;

                    try
                    {
                        TreeListNode node = this.treeList.FocusedNode.ParentNode;
                        queryChildNodes(node);
                        node.ExpandAll();
                    }
                    catch (Exception err)
                    {
                        //this.EFMsgInfo = err.ToString();
                    }
                }
                else if (result == DialogResult.Cancel)
                {
                    //this.EFMsgInfo = EP.EPES.EPESC0000070/*取消新增*/;
                }
            }
            catch (Exception err)
            {
                //this.EFMsgInfo = err.ToString();
            }
        }
Example #2
0
        //新增目录
        private void popupTreeAdd_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                //this.EFMsgInfo = EP.EPES.EPESC0000068/*新增目录*/;
                ES.FormESOBJ_TREEINS FormIns = new ES.FormESOBJ_TREEINS();
                FormIns.Icon = this.Icon;
                if (this.treeList.FocusedNode == null)
                {
                    FormIns.Fname = fgDevCheckEdit2.Checked ? "webroot" : "root";
                    FormIns.Treeseq = this.treeList.Nodes.Count;
                }
                else
                {
                    FormIns.Fname = this.treeList.FocusedNode.Tag.ToString();//传递参数,将选择的节点作为新增的目录的父节点
                    FormIns.Treeseq = this.treeList.FocusedNode.Nodes.Count;//传递参数,父节点的子节点数作为新增目录的顺序号
                }
                FormIns.Cursystem = comboApp.EditValue.ToString().Split(':')[0];//传递参数代表当前系统

                FormIns.Text = EP.EPES.EPESC0000068/*新增目录*/;
                FormIns.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;

                DialogResult result = FormIns.ShowDialog();

                if (result == DialogResult.OK)
                {
                    //this.EFMsgInfo = EP.EPES.EPESC0000069/*新增成功*/;

                    //新增成功后更新树
                    try
                    {
                        if (treeList.FocusedNode != null)
                        {
                            queryChildNodes(this.treeList.FocusedNode);

                            this.treeList.FocusedNode.ExpandAll();
                        }
                        else
                        {
                            LoadTree();
                        }
                    }
                    catch (Exception err)
                    {
                        //this.EFMsgInfo = err.ToString();
                    }
                }
                else if (result == DialogResult.Cancel)
                {
                    //this.EFMsgInfo = EP.EPES.EPESC0000070/*取消新增*/;
                }
            }
            catch (Exception err)
            {
                //this.EFMsgInfo = err.ToString();
            }
        }