Example #1
0
        /// <summary>
        /// 修改
        /// </summary>
        public override void EntityUpdate()
        {
            AuthGrpRule rule   = new AuthGrpRule();
            AuthGrp     entity = EntityGet();

            rule.RUpdate(entity);
        }
Example #2
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            AuthGrpRule rule = new AuthGrpRule();

            gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1));
            gridView1.GridControl.Show();
        }
Example #3
0
        /// <summary>
        /// 新增
        /// </summary>
        public override int EntityAdd()
        {
            AuthGrpRule rule   = new AuthGrpRule();
            AuthGrp     entity = EntityGet();

            rule.RAdd(entity);
            return(entity.ID);
        }
Example #4
0
        /// <summary>
        /// 删除
        /// </summary>
        public override void EntityDelete()
        {
            if (txtID.Text.Trim() == "1")
            {
                throw new Exception("ID为1的权限不允许编辑");
            }
            AuthGrpRule rule   = new AuthGrpRule();
            AuthGrp     entity = EntityGet();

            rule.RDelete(entity);
        }
Example #5
0
        /// <summary>
        /// 保存权限群
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnSaveAuth_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.新增))
                {
                    this.ShowMessage("你没有此操作权限");
                    return;
                }
                if (HTFormStatus == FormStatus.查询)
                {
                    SetTreeListDefault(treeList1.Nodes);
                    AuthGrpRule         rule      = new AuthGrpRule();
                    AuthGrpWinList[]    entity    = this.GetEntityWinList();
                    AuthGrpWinListSub[] entitysub = this.GetEntityWinListSub();

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