Exemplo n.º 1
0
        private void fpSpread1_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            Neusoft.HISFC.BizLogic.Privilege.Model.Resource oldResItem = new Neusoft.HISFC.BizLogic.Privilege.Model.Resource();
            TranslateEntity(oldResItem);
            AddResourceForm _frmAdd = new AddResourceForm(oldResItem, (nTreeView1.SelectedNode.Tag as Neusoft.HISFC.BizLogic.Privilege.Model.Resource).ControlType, "updataRes");

            _frmAdd.ShowDialog();

            if (_frmAdd.DialogResult == DialogResult.OK)
            {
                Neusoft.HISFC.BizLogic.Privilege.Model.Resource currentResources = _frmAdd.currentRes;

                if (currentResources != null)
                {
                    AddMenuToList(currentResources);
                }
                nTreeView1_AfterSelect(null, null);
            }
        }
Exemplo n.º 2
0
        public void AddRes()
        {
            if (nTreeView1.SelectedNode == null)
            {
                MessageBox.Show("请选择要选取的分类!");
                return;
            }

            AddResourceForm _frmAdd = new AddResourceForm(nTreeView1.SelectedNode.Tag as Neusoft.HISFC.BizLogic.Privilege.Model.Resource, (nTreeView1.SelectedNode.Tag as Neusoft.HISFC.BizLogic.Privilege.Model.Resource).ControlType);

            _frmAdd.ShowDialog();
            if (_frmAdd.DialogResult == DialogResult.OK)
            {
                Neusoft.HISFC.BizLogic.Privilege.Model.Resource currentRes = _frmAdd.currentRes;
                if (currentRes != null)
                {
                    AddMenuToList(currentRes);
                }

                nTreeView1_AfterSelect(null, null);
            }
        }