Пример #1
0
        /// <summary>
        /// 批量保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAllSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FCommon.RightCheck(this.FormID, this.FormListAID, this.FormListBID, RightSub.新增))//权限管理
                {
                    this.ShowMessage("你没有此操作权限");
                    return;
                }

                if (DialogResult.Yes != ShowConfirmMessage("批量保存将覆盖所有用户的权限设置!"))
                {
                    return;
                }

                SetTreeListDefault(treeList1.Nodes);
                OPWinListRule  rule      = new OPWinListRule();
                OPWinList[]    entity    = this.GetEntityOPWinList();
                OPWinListSub[] entitysub = this.GetEntityOPWinListSub();

                rule.RAllSave(entity, entitysub);
            }
            catch
            {
            }
        }
Пример #2
0
        /// <summary>
        /// 保存窗体权限
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSaveWinList_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FCommon.RightCheck(this.FormID, this.FormListAID, this.FormListBID, RightSub.新增))//权限管理
                {
                    this.ShowMessage("你没有此操作权限");
                    return;
                }
                SetTreeListDefault(treeList1.Nodes);
                OPWinListRule  rule      = new OPWinListRule();
                OPWinList[]    entity    = this.GetEntityOPWinList();
                OPWinListSub[] entitysub = this.GetEntityOPWinListSub();

                rule.RSave(entity, entitysub, OPID);
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }