Example #1
0
        private void cmdAddRight(string arg)
        {
            Right r = null;
            if ((editRight.EditValue as Right) == null)
            {
                r = new Right { Name = editRight.EditValue.ToString() };
                r.Save();
            }
            else
                r = editRight.EditValue as Right;

            RoleRight rr = new RoleRight
            {
                RightId = r.Id,
                RoleId = CurrentRole.Id
            };

            rr.Save();
            listEntityRoleRight.BindData();

            editRight.EditValue = null;
        }