Example #1
0
        public List <AutoCompleteDTO> GetAllMembers(string prefixTxt)
        {
            //GetCompletionList

            MessagesDAL   member  = new MessagesDAL();
            List <Member> members = member.SearchMember(prefixTxt);
            List <Group>  groups  = member.SearchGroup(prefixTxt);

            AutoCompleteDTO        auto;
            List <AutoCompleteDTO> items = new List <AutoCompleteDTO>();

            string[,] mmb = new string[1, 2];


            //ADDING MEMBERS TO LIST
            foreach (var element in members)
            {
                if (element.MemberId == HttpContext.Current.Session["memberID"].ToString())
                {
                    //DO NOT ADD
                }
                else
                {
                    auto = new AutoCompleteDTO(element.MemberId, element.DisplayName, "People");
                    items.Add(auto);
                }
            }

            //ADDING GROUPS TO LIST
            foreach (var element in groups)
            {
                if (element.MemberId == HttpContext.Current.Session["memberID"].ToString())
                {
                    //DO NOT ADD
                }
                else
                {
                    auto = new AutoCompleteDTO(element.GroupId.ToString(), element.GroupDescription, "Groups");
                    items.Add(auto);
                }
            }

            return(items);
        }
Example #2
0
        public List<AutoCompleteDTO> GetAllMembers(string prefixTxt)
        {
            //GetCompletionList

            MessagesDAL member = new MessagesDAL();
            List<Member> members = member.SearchMember(prefixTxt);
            List<Group> groups = member.SearchGroup(prefixTxt);

            AutoCompleteDTO auto;
            List<AutoCompleteDTO> items = new List<AutoCompleteDTO>();
            string[,] mmb = new string[1, 2];

            //ADDING MEMBERS TO LIST
            foreach (var element in members)
            {
                if (element.MemberId == HttpContext.Current.Session["memberID"].ToString())
                {
                    //DO NOT ADD
                }
                else
                {
                    auto = new AutoCompleteDTO(element.MemberId, element.DisplayName, "People");
                    items.Add(auto);
                }

            }

            //ADDING GROUPS TO LIST
            foreach (var element in groups)
            {
                if (element.MemberId == HttpContext.Current.Session["memberID"].ToString())
                {
                    //DO NOT ADD
                }
                else
                {
                    auto = new AutoCompleteDTO(element.GroupId.ToString(), element.GroupDescription, "Groups");
                    items.Add(auto);
                }

            }

            return items;
        }