Beispiel #1
0
        private void setAutoComplete()
        {
            txtName.AutoCompleteMode     = txtAuthor.AutoCompleteMode = txtSerial.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            txtSerial.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var txtNameAutoCompleteCustomsource = new AutoCompleteStringCollection();

            txtNameAutoCompleteCustomsource.AddRange(Book.getBookName());
            txtName.AutoCompleteCustomSource = txtNameAutoCompleteCustomsource;
            //serial
            txtName.AutoCompleteMode     = txtAuthor.AutoCompleteMode = txtSerial.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            txtSerial.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var txtSerialAutoCompleteCustomsource = new AutoCompleteStringCollection();

            txtSerialAutoCompleteCustomsource.AddRange(Book.getBookSerial());
            txtSerial.AutoCompleteCustomSource = txtSerialAutoCompleteCustomsource;
        }
        private void setAutoComplete()
        {
            //Id Student
            txtIdBorrow.AutoCompleteMode    = txtIdBook.AutoCompleteMode = txtIdStudent.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            txtIdStudent.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var txtIdStudentAutoCompleteCustomsource = new AutoCompleteStringCollection();

            txtIdStudentAutoCompleteCustomsource.AddRange(Student.getStudentId());
            txtIdStudent.AutoCompleteCustomSource = txtIdStudentAutoCompleteCustomsource;
            //Id borrow
            //txt.AutoCompleteMode = txtEmail.AutoCompleteMode = txtIdStudent.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
            txtIdBorrow.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var txtIdBorrowAutoCompleteCustomsource = new AutoCompleteStringCollection();

            txtIdBorrowAutoCompleteCustomsource.AddRange(Borrow.getBorrowId());
            txtIdBorrow.AutoCompleteCustomSource = txtIdBorrowAutoCompleteCustomsource;

            //id Book
            txtIdBook.AutoCompleteSource = AutoCompleteSource.CustomSource;
            var txtIdBookAutoCompleteCustomsource = new AutoCompleteStringCollection();

            txtIdBookAutoCompleteCustomsource.AddRange(Book.getBookSerial());
            txtIdBook.AutoCompleteCustomSource = txtIdBookAutoCompleteCustomsource;
        }