Beispiel #1
0
        public static string[] GetCompletionList(string prefixText, int count)
        {
            string encrypFriendID = null;

            if (count == 0)
            {
                count = 10;
            }

            MessagesDAL   member  = new MessagesDAL();
            List <Member> members = member.SearchMember(prefixText);

            List <string> items = new List <string>(count);


            foreach (var element in members)
            {
                encrypFriendID = element.MemberId;
                // items.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(element.DisplayName, encrypFriendID));
            }



            return(items.ToArray());
        }
Beispiel #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);
        }
Beispiel #3
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;
        }
Beispiel #4
0
        public List<AutoCompleteDTO> GetAllFriends(string prefixTxt)
        {
            //GetCompletionList

            MessagesDAL member = new MessagesDAL();
            List<Member> members = member.SearchMember(prefixTxt);
            AutoCompleteDTO auto;
            List<AutoCompleteDTO> items = new List<AutoCompleteDTO>();
            string[,] mmb = new string[1,2];

            foreach (var element in members)
            {

                auto = new AutoCompleteDTO(element.MemberId, element.DisplayName);
                items.Add(auto);

            }

            return items;
        }
Beispiel #5
0
        public List <AutoCompleteDTO> GetAllFriends(string prefixTxt)
        {
            //GetCompletionList

            MessagesDAL            member  = new MessagesDAL();
            List <Member>          members = member.SearchMember(prefixTxt);
            AutoCompleteDTO        auto;
            List <AutoCompleteDTO> items = new List <AutoCompleteDTO>();

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



            foreach (var element in members)
            {
                auto = new AutoCompleteDTO(element.MemberId, element.DisplayName);
                items.Add(auto);
            }

            return(items);
        }
        public static string[] GetCompletionList(string prefixText, int count)
        {
            string encrypFriendID = null;

            if (count == 0)
            {

                count = 10;

            }

            MessagesDAL member = new MessagesDAL();
            List<Member> members = member.SearchMember(prefixText);

            List<string> items = new List<string>(count);

            foreach (var element in members)
            {
                encrypFriendID = element.MemberId;
                // items.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(element.DisplayName, encrypFriendID));
            }

            return items.ToArray();
        }