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); } } }
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); } } }