private void CreateSelectOptions(string resTypeId, NFC.Interface.Controls.NeuGroupBox parent) { PrivilegeService _proxy = Common.Util.CreateProxy(); IList <Neusoft.Privilege.BizLogic.Model.Operation> _operations = null; try { using (_proxy as IDisposable) { _operations = _proxy.GetOperation(resTypeId); } } catch (Exception e) { MessageBox.Show(e.Message, "提示"); return; } int _row = 1, _col = 1; ResourceType _resType = getResType(resTypeId); foreach (Neusoft.Privilege.BizLogic.Model.Operation _operation in _operations) { if (_col >= 4) { _row++; _col = 1; } parent.Controls.Add(CreateOption(_operation, _resType.Exclusive, _row, _col)); _col++; } }
private bool IsJudgeOperationForOne(string resTypeId) { IList <Neusoft.Privilege.BizLogic.Model.Operation> _operations = null; try { PrivilegeService _proxy = Common.Util.CreateProxy(); using (_proxy as IDisposable) { _operations = _proxy.GetOperation(resTypeId); } if (_operations.Count == 1) { return(true); } else { return(false); } } catch { return(false); } }