Ejemplo n.º 1
0
        private void EliminarMenuColumnDeMenu(int idMenuColumn)
        {
            ServiceMenu _srvMenu = new ServiceMenu();

            foreach (MenuDto iMenu in _srvMenu.GetAll())
            {
                if (iMenu.cols != null && iMenu.cols.FirstOrDefault(x => x.id == idMenuColumn) != null)
                {
                    iMenu.cols = iMenu.cols.FindAll(x => x.id != idMenuColumn);
                    _srvMenu.Modify(iMenu);
                }
            }
        }
Ejemplo n.º 2
0
        private void ModificarMenuColumnEnMenu(MenuColumnDto pMenuColumn)
        {
            ServiceMenu _srvMenu = new ServiceMenu();

            foreach (MenuDto iMenu in _srvMenu.GetAll())
            {
                if (iMenu.cols != null && iMenu.cols.FirstOrDefault(x => x.id == pMenuColumn.id) != null)
                {
                    iMenu.cols.FirstOrDefault(x => x.id == pMenuColumn.id).title  = pMenuColumn.title;
                    iMenu.cols.FirstOrDefault(x => x.id == pMenuColumn.id).items  = pMenuColumn.items;
                    iMenu.cols.FirstOrDefault(x => x.id == pMenuColumn.id).groups = pMenuColumn.groups;

                    _srvMenu.Modify(iMenu);
                }
            }
        }