コード例 #1
0
        protected override ContextMenuStrip GetContextMenuStrip()
        {
            PRERoleInfo      role = PREOperatorInfo.CurrentOperator.Role;
            ContextMenuStrip menu = base.GetContextMenuStrip();

            menu.Items["mnu_Add"].Enabled    = role.Permit(PREPermission.EditWorkstations);
            menu.Items["mnu_Delete"].Enabled = role.Permit(PREPermission.EditWorkstations);
            return(menu);
        }
コード例 #2
0
        protected override void InitControls()
        {
            PRERoleInfo role = PREOperatorInfo.CurrentOperator.Role;

            this.btnOk.Enabled = role.Permit(PREPermission.EditBusiness);
            if (IsAdding)
            {
                this.Text = "商家信息";
            }
        }
コード例 #3
0
        protected override void InitControls()
        {
            base.InitControls();
            if (IsAdding)
            {
                this.Text = "新增";
            }
            else
            {
                this.Text = (UpdatingItem as PREWorkstation).WorkstationName;
            }
            PRERoleInfo role = PREOperatorInfo.CurrentOperator.Role;

            this.btnOk.Enabled = role.Permit(PREPermission.EditWorkstations);
        }
コード例 #4
0
        /// <summary>
        /// 用户菜单权限
        /// </summary>
        /// <param name="op"></param>
        private void ShowOperatorRights(PREOperatorInfo op)
        {
            PRERoleInfo role = op.Role;

            this.mnu_System.Enabled             = role.Permit(PREPermission.SystemSetting) || role.Permit(PREPermission.PreferentialCore) || role.Permit(PREPermission.PreferentialCancel);
            this.mnu_SysOptions.Enabled         = role.Permit(PREPermission.SystemSetting);
            this.mnu_PreferentialInput.Enabled  = role.Permit(PREPermission.PreferentialCore);
            this.mnu_PreferentialCancel.Enabled = role.Permit(PREPermission.PreferentialCancel);
            this.mnu_Data.Enabled        = role.Permit(PREPermission.ReadWorkstations) || role.Permit(PREPermission.EditWorkstations) || role.Permit(PREPermission.ReadBusiness) || role.Permit(PREPermission.EditBusiness);
            this.mnu_WorkStation.Enabled = role.Permit(PREPermission.ReadWorkstations) || role.Permit(PREPermission.EditWorkstations);
            this.mnu_Company.Enabled     = role.Permit(PREPermission.ReadBusiness) || role.Permit(PREPermission.EditBusiness);
            //this.mnu_SafeSetting.Enabled = role.Permit(PREPermission.OperatorManager) || role.Permit(PREPermission.RoleManager);
            this.mnu_Operator.Enabled    = role.Permit(PREPermission.OperatorManager);
            this.mnu_RoleManager.Enabled = role.Permit(PREPermission.RoleManager);
            this.mnu_Report.Enabled      = role.Permit(PREPermission.PreferentialReport);
            this.mnu_PRERecord.Enabled   = role.Permit(PREPermission.PreferentialReport);
        }