Пример #1
0
        public CUserMenu FindByMenu(Guid UI_Menu_id, Guid UI_DesktopGroup_id)
        {
            List <CBaseObject> lstObj = GetList();

            foreach (CBaseObject obj in lstObj)
            {
                CUserMenu UserMenu = (CUserMenu)obj;
                if (UserMenu.UI_Menu_id == UI_Menu_id &&
                    UserMenu.UI_DesktopGroup_id == UI_DesktopGroup_id)
                {
                    return(UserMenu);
                }
            }
            return(null);
        }
Пример #2
0
        public void RemoveByDesktopGroupId(Guid UI_DesktopGroup_id)
        {
            List <CBaseObject> lstDel = new List <CBaseObject>();
            List <CBaseObject> lstObj = GetList();

            foreach (CBaseObject obj in lstObj)
            {
                CUserMenu UserMenu = (CUserMenu)obj;
                if (UserMenu.UI_DesktopGroup_id == UI_DesktopGroup_id)
                {
                    lstDel.Add(UserMenu);
                }
            }
            foreach (CBaseObject obj in lstDel)
            {
                Delete(obj);
            }
        }