private void LoadResourceType()
        {
            PrivilegeService _proxy = Common.Util.CreateProxy();

            using (_proxy as IDisposable)
            {
                resTypes = _proxy.GetResourceTypes();
            }
        }
示例#2
0
        private void LoadResourceType()
        {
            IList <Neusoft.Privilege.BizLogic.Model.Operation> _operations = null;
            PrivilegeService _proxy = Common.Util.CreateProxy();

            try
            {
                using (_proxy as IDisposable)
                {
                    _resTypes = _proxy.GetResourceTypes();
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "提示");
                return;
            }

            this.nTabControl1.TabPages.Clear();
            foreach (ResourceType _resType in _resTypes)
            {
                if (IsJudgeOperationForOne(_resType.Id))
                {
                    BuildTabPageForOne(_resType);
                }
                else
                {
                    BuildTabPage(_resType);
                }
            }

            if (this.nTabControl1.TabPages.Count > 0)
            {
                this.nTabControl1_Selected(null, null);
            }
        }