Esempio n. 1
0
        public string[] GetMemberCustomerNamesForGrouping(string prefixText, int count, string contextKey)
        {
            CustomerBo customerBo     = new CustomerBo();
            DataTable  dtCustomerName = new DataTable();
            int        i = 0;
            int        selectedParentId = 0;
            int        rmId             = 0;

            string[] splitStr = contextKey.Split('|');
            rmId             = int.Parse(splitStr[0].ToString());
            selectedParentId = int.Parse(splitStr[1].ToString());
            List <string> names = new List <string>();

            dtCustomerName = customerBo.GetMemberCustomerNamesForGrouping(prefixText, selectedParentId, rmId);
            //string[] customerNameList = new string[dtCustomerName.Rows.Count];

            foreach (DataRow dr in dtCustomerName.Rows)
            {
                string item = AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr["C_FirstName"].ToString(), dr["C_CustomerId"].ToString());
                names.Add(item);

                //customerNameList[i] = dr["C_FirstName"].ToString() + "|" + dr["C_PANNum"].ToString();
                //i++;
            }
            return(names.ToArray());
        }