private void EliminarMenuGroupDeMenuColumn(int idMenuGroup)
        {
            ServiceMenuColumn _srvMenuColumn = new ServiceMenuColumn();

            foreach (MenuColumnDto iMenuColumn in _srvMenuColumn.GetAll())
            {
                if (iMenuColumn.groups != null && iMenuColumn.groups.FirstOrDefault(x => x.id == idMenuGroup) != null)
                {
                    iMenuColumn.groups = iMenuColumn.groups.FindAll(x => x.id != idMenuGroup);
                    _srvMenuColumn.Modify(iMenuColumn);
                }
            }
        }
        private void ModificarMenuGroupEnMenuColumn(MenuGroupDto pMenuGroup)
        {
            ServiceMenuColumn _srvMenuColumn = new ServiceMenuColumn();

            foreach (MenuColumnDto iMenuColumn in _srvMenuColumn.GetAll())
            {
                if (iMenuColumn.groups != null && iMenuColumn.groups.FirstOrDefault(x => x.id == pMenuGroup.id) != null)
                {
                    iMenuColumn.groups.FirstOrDefault(x => x.id == pMenuGroup.id).title = pMenuGroup.title;
                    iMenuColumn.groups.FirstOrDefault(x => x.id == pMenuGroup.id).items = pMenuGroup.items;

                    _srvMenuColumn.Modify(iMenuColumn);
                }
            }
        }
Example #3
0
        private void ModificarMenuItemEnMenuColumn(MenuItemDto pMenuItem)
        {
            ServiceMenuColumn _srvMenuColumn = new ServiceMenuColumn();

            foreach (MenuColumnDto iMenuColumn in _srvMenuColumn.GetAll())
            {
                if (iMenuColumn.items != null && iMenuColumn.items.FirstOrDefault(x => x.id == pMenuItem.id) != null)
                {
                    iMenuColumn.items.FirstOrDefault(x => x.id == pMenuItem.id).name       = pMenuItem.name;
                    iMenuColumn.items.FirstOrDefault(x => x.id == pMenuItem.id).link       = pMenuItem.link;
                    iMenuColumn.items.FirstOrDefault(x => x.id == pMenuItem.id).prefix     = pMenuItem.prefix;
                    iMenuColumn.items.FirstOrDefault(x => x.id == pMenuItem.id).isFavorite = pMenuItem.isFavorite;

                    _srvMenuColumn.Modify(iMenuColumn);
                }
            }
        }
Example #4
0
 public ServiceMenu()
 {
     _srvMenuColumn = new ServiceMenuColumn();
 }