private void txtPesquisa_TextChanged(object sender, EventArgs e)
        {
            string keywords = txtPesquisa.Text;

            if (keywords != null)
            {
                DataTable dt = dal.Search(keywords);
                dgvUser.DataSource = dt;
            }
            else
            {
                DataTable dt = dal.Search();
                dgvUser.DataSource = dt;
            }
        }
Example #2
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            if (txtSearch.Text == "")
            {
                MessageBox.Show("Please enter a keyword to search");
            }
            else
            {
                //Get Keyword from Text box
                string keywords = txtSearch.Text;

                //Chec if the keywords has value or not
                if (keywords != null)
                {
                    //Show user based on keywords
                    DataTable dt = dal.Search(keywords);
                    dgvUsers.DataSource = dt;
                }
                else
                {
                    //show all users from the database
                    DataTable dt = dal.Select();
                    dgvUsers.DataSource = dt;
                }
            }
        }
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            // Obter as keywords(palavras-chave) do formulário
            string keywords = txtSearch.Text;

            if (keywords != null)
            {
                // Pesquise os produtos
                DataTable dt = dal.Search(keywords);
                dgvUser.DataSource = dt;
            }
            else
            {
                // Exibir todos os produtos
                DataTable dt = dal.Search();
                dgvUser.DataSource = dt;
            }
        }
Example #4
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            //Get Keyword form Text box
            string keywords = txtSearch.Text;

            //Check if the keywords has value or not
            if (keywords != null)
            {
                //Show user based on keywords
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
        }
Example #5
0
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            String keywords = txtSearch.Text;

            if (keywords != null)
            {
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
        private void keywords_TextChanged(object sender, EventArgs e)
        {
            string keywords12 = keywords.Text;

            if (keywords12 != null)
            {
                DataTable dt = userdal.Search(keywords12);
                dgv.DataSource = dt;
            }
            else
            {
                DataTable dt = userdal.Select();
                dgv.DataSource = dt;
            }
        }
Example #7
0
        private void textBoxSearch_TextChanged(object sender, EventArgs e)
        {
            //get keyword from the textbox
            String keywords = textBoxSearch.Text;

            if (keywords != null)
            {
                DataTable dt = dal.Search(keywords);
                dataGridViewUsers.DataSource = dt;
            }
            else
            {
                DataTable dt = dal.Select();
                dataGridViewUsers.DataSource = dt;
            }
        }
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            //Get Keyword from Textbox
            string keywords = txtSearch.Text;

            //Check if the keywords has values or not
            if (keywords != null)
            {
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                DataTable dt = dal.select();
                dgvUsers.DataSource = dt;
            }
        }
        private void textBox9_TextChanged(object sender, EventArgs e)
        {
            // we need to get keyword from Text box
            string keywords = textBox9.Text;

            if (keywords != null)
            {
                //show user from database
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                // show all users from the database
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
Example #10
0
        private void textBox1_TextChanged_1(object sender, EventArgs e)
        {
            string keywords = txtBoxSearch.Text;

            //check if the keywords has value
            if (keywords != null)
            {
                //Show user based on keywords
                DataTable dataTable = userDAL.Search(keywords);
                dgvUser.DataSource = dataTable;
            }
            else
            {
                //show all users from the database
                DataTable dataTable = userDAL.Select();
                dgvUser.DataSource = dataTable;
            }
        }
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            //Get Keyword from Text Box Search
            string keywords = txtSearch.Text;

            //Check if the keyword have any value or not
            if (keywords != null)
            {
                //Show user based on Keywords
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                //Show all users from the Database
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
Example #12
0
        private void TbSearch_TextChanged(object sender, EventArgs e)
        {
            //Get the keywords from the search box
            string keywords = tbSearch.Text;

            //Check if the keyword has value
            if (keywords != null)
            {
                //Show user based on keyword
                DataTable dt = d.Search(keywords);
                dgvAdduser.DataSource = dt;
            }
            else
            {
                //Show all users in database
                DataTable dt = d.SelectSI();
                dgvAdduser.DataSource = dt;
            }
        }
Example #13
0
        private void TxtSearch_TextChanged(object sender, EventArgs e)
        {
            //Get keywords from textbox
            string keywords = txtSearch.Text;

            //Check if the keywords has value or not
            if (keywords != null)
            {
                //show user based on keywords
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                //show all user fro databse
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
Example #14
0
        private void TextBox14_TextChanged(object sender, EventArgs e)
        {
            //write the code to get the users based on keywords
            String keywords = textBox14.Text;

            //Check whether the textbox is empty or not
            if (keywords != null)
            {
                //TextBox is not empty, display users on Data Grid View based on the keywords
                DataTable dt = dal.Search(keywords);
                userDataGrid.DataSource = dt;
            }
            else
            {
                //Text box is empty and display all the usere on the datagrid view
                DataTable dt = dal.Select();
                userDataGrid.DataSource = dt;
            }
        }
Example #15
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            //Get Keyword from Text box
            string keywords = txtSearch.Text;

            //Chec if the keywords has value or not
            if (keywords != null)
            {
                //Show user based on keywords
                DataTable dt = dal.Search(keywords, frmLogin.branchId);
                dgvUsers.DataSource = dt;
            }
            else
            {
                //show all users from the database
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            //Write the Code to Get the users BAsed on Keywords
            //1. Get the Keywords from the TExtBox
            String keywords = txtSearch.Text;

            //Check whether the textbox is empty or not
            if (keywords != null)
            {
                //TextBox is not empty, display users on DAta Grid View based on the keywords
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                //TExtbox is Empty and display all the users on DAta Grid View
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
Example #17
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            // Get keyword from Text Box
            string Keywords = txtSearch.Text;

            //check if keywords have value or not

            if (Keywords != null)
            {
                // show user based on keywords
                DataTable dt = dal.Search(Keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                // show all users from database
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
Example #18
0
        private void textBoxSearch_TextChanged(object sender, EventArgs e)
        {
            //write the code to get the users based on keywords
            //get the keywords from the textbox
            String keywords = textBoxSearch.Text;

            //check whether the textbox is empty or not
            if (keywords != null)
            {
                //textbox is not empty, display data on dgv based on keywords
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }
            else
            {
                //textbox is empty and display all the user on dgv
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
Example #19
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            //Get Keyords from textbox

            string keywords = txtSearch.Text;

            //check if keyword is not null

            if (keywords != null)
            {
                DataTable dt = dal.Search(keywords);
                dgvUsers.DataSource = dt;
            }

            else
            {
                MessageBox.Show("You didn't input any Keywords to search box");
                DataTable dt = dal.Select();
                dgvUsers.DataSource = dt;
            }
        }
        private void textBoxBookUserSearch_TextChanged(object sender, EventArgs e)
        {
            string val = textBoxBookUserSearch.Text;

            switch (comboBoxBookUserSearch.Text.Trim())
            {
            case "User":
                this.dataGridViewBookUserSearchResult.DataSource = null;
                DataTable dt = userD.Search(val);
                dataGridViewBookUserSearchResult.DataSource = dt;

                break;

            case "Book":
                this.dataGridViewBookUserSearchResult.DataSource = null;
                DataTable bt = bookD.Search(val);
                dataGridViewBookUserSearchResult.DataSource = bt;
                break;

            default:
                MessageBox.Show("Please select either book or user to search");
                break;
            }
        }
Example #21
0
        private void refreshDataGridView(string type = null)
        {
            DataTable dt = type != null?dal.Search(type) : dal.Select();

            dgvUsers.DataSource = dt;
        }