/// <summary> /// Use this method to get the reference of an already loaded list6 /// (this method doesn't load the params, reusable in Interface) /// </summary> /// <param name="cListName"></param> /// <returns></returns> public IEnumerable <object> getListGroup(string cGroupName) { OptionList oListRet; if (cGroupName != null && cGroupName.Length > 0) { AvailabeList oAvailable; //if (this.oAvailabeLists.TryGetValue(cListName, out cSPList)) oAvailable = this.AvailabeLists.Find(itm => itm.cListGroup == cGroupName); if (oAvailable != null) { oListRet = new OptionList(oAvailable.cListName, oAvailable.cListSP); } else { this.sMsgError.Add("Group not found."); oListRet = new OptionList(); } } else { oListRet = new OptionList(); } return(oListRet.Itens.AsEnumerable()); }
/// <summary> /// Use this method to get the reference of an already loaded list by it's name /// (this method doesn't load the params, reusable in Interface) /// </summary> /// <param name="cListName"></param> /// <returns></returns> public IEnumerable <object> getList(string cListName) { OptionList oListRet; if (cListName != null && cListName.Length > 0) { //if (this.oAvailabeLists.TryGetValue(cListName, out cSPList)) oListRet = this.ValueLists.Find(itm => itm.ListName == cListName); if (oListRet == null) { this.sMsgError.Add("List not found."); oListRet = new OptionList(); } } else { this.sMsgError.Add("Bad parameter."); oListRet = new OptionList(); } return(oListRet.Itens.AsEnumerable()); }