예제 #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());
        }
예제 #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);
        }
예제 #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;
        }
예제 #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;
        }
예제 #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);
        }
예제 #6
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();
        }