Example #1
0
        private void goiy()
        {
            string sql = "select distinct tenncc from Nha_cc ";



            SqlDataReader reader = DAO.getDataReader(sql);

            AutoCompleteStringCollection auto = new AutoCompleteStringCollection();

            if (reader != null)

            {
                while (reader.Read())

                {
                    auto.Add(reader["tenncc"].ToString());
                }
            }
            textBoxtenncc.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

            textBoxtenncc.AutoCompleteSource = AutoCompleteSource.CustomSource;

            textBoxtenncc.AutoCompleteCustomSource = auto;

            reader.Close();
        }
Example #2
0
        private void goiy()
        {
            string sql = "select distinct tennv from nhan_vien where tennv like '%" + combo_manv.Text + "%'";



            SqlDataReader reader = DAO.getDataReader(sql);

            AutoCompleteStringCollection auto = new AutoCompleteStringCollection();

            if (reader != null)

            {
                while (reader.Read())

                {
                    auto.Add(reader["tennv"].ToString());
                }
            }
            combo_manv.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

            combo_manv.AutoCompleteSource = AutoCompleteSource.CustomSource;

            combo_manv.AutoCompleteCustomSource = auto;

            reader.Close();
        }
Example #3
0
        private void goiy()
        {
            string sql = "select distinct thoigianbaohanh from DM_Binh_ga ";



            SqlDataReader reader = DAO.getDataReader(sql);

            AutoCompleteStringCollection auto = new AutoCompleteStringCollection();

            if (reader != null)

            {
                while (reader.Read())

                {
                    auto.Add(reader["thoigianbaohanh"].ToString());
                }
            }
            txtTGBH.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

            txtTGBH.AutoCompleteSource = AutoCompleteSource.CustomSource;

            txtTGBH.AutoCompleteCustomSource = auto;

            reader.Close();
        }