Ejemplo n.º 1
0
        public void EnableOrDisabled(int profileId, int menuId, long permissionId, long userId)
        {
            if (permissionId != 0)
            {
                _menuRepository.RemoveProfileForMenu(permissionId, userId);
            }
            else
            {
                var pm = new ProfileForMenu
                {
                    ProfileId = profileId,
                    MenuId    = menuId,
                };

                _menuRepository.AddProfileForMenu(pm, userId);
            }
        }