Beispiel #1
0
 public MDOListItem[] GetSimpleList(string listName)
 {
     using (MDOAgent mdoAgent = new MDOAgent())
     {
         return(mdoAgent.GetSimpleList(listName));
     }
 }
Beispiel #2
0
        public MDOListItem[] GetAllLists()
        {
            if (_allLists != null)
            {
                return(_allLists);
            }

            using (MDOAgent mdoAgent = new MDOAgent())
            {
                _allLists = mdoAgent.GetList("Lists", true, string.Empty, false);
            }

            return(_allLists);
        }
        /// <summary>
        /// Use to obtain the list id for web panels.
        /// </summary>
        /// <returns>List Id for managing web panels. Less than zero if there was an error.</returns>
        private int GetWebPanelListId()
        {
            var webPanelListId = -1;

            using (var mdoAgent = new MDOAgent())
            {
                //Get All Lists
                var lists = mdoAgent.GetList("Lists", true, string.Empty, false);

                //Find the list item for web panels
                var listId = lists.FirstOrDefault(l => l.Type == "webpanel");

                if (listId != null)
                {
                    webPanelListId = listId.Id;
                }
            }

            return(webPanelListId);
        }