Exemplo n.º 1
0
        private AutoCompleteStringCollection Tao_Data_AutoComplete_Cbo_TenHocSinh()
        {
            DataTable tb = _hocSinhBUS.LayDT_TenHocSinh();
            var       cl = new AutoCompleteStringCollection();

            foreach (DataRow rd in tb.Rows)
            {
                cl.Add(rd["TenHocSinh"].ToString());
                string[] hoten = ObjectUtil.LayHoTen(rd["TenHocSinh"].ToString());
                if (hoten[0] != "")
                {
                    cl.Add(hoten[0]);
                }
                if (hoten[1] != "")
                {
                    cl.Add(hoten[1]);
                }
                if (hoten[2] != "")
                {
                    cl.Add(hoten[2]);
                }
            }
            return(cl);
        }