Exemplo n.º 1
0
        public CRoleMenu FindByMenu(Guid UI_Menu_id, Guid UI_DesktopGroup_id)
        {
            List <CBaseObject> lstObj = GetList();

            foreach (CBaseObject obj in lstObj)
            {
                CRoleMenu RoleMenu = (CRoleMenu)obj;
                if (RoleMenu.UI_Menu_id == UI_Menu_id &&
                    RoleMenu.UI_DesktopGroup_id == UI_DesktopGroup_id)
                {
                    return(RoleMenu);
                }
            }
            return(null);
        }
Exemplo n.º 2
0
        public void RemoveByDesktopGroupId(Guid UI_DesktopGroup_id)
        {
            List <CBaseObject> lstDel = new List <CBaseObject>();
            List <CBaseObject> lstObj = GetList();

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