Exemple #1
0
        private void btn_refresh_Click(object sender, EventArgs e)
        {
            ViewUsers vu = new ViewUsers();
            DataTable dt = vu.Select_user();

            dataGridView1.DataSource = dt;
        }
Exemple #2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string    type = comboBox_slctutype.Text;
            ViewUsers vu   = new ViewUsers();
            DataTable dt   = vu.Sort_usertype(type);

            dataGridView1.DataSource = dt;
        }
Exemple #3
0
        private void ViewUsers_Load(object sender, EventArgs e)
        {
            // Data Grid View
            ViewUsers vu = new ViewUsers();
            DataTable dt = vu.Select_user();

            dataGridView1.DataSource = dt;
        }
Exemple #4
0
        private void text_search_TextChanged(object sender, EventArgs e)
        {
            //get keyword from textbox
            string    keyword = text_search.Text;
            ViewUsers vu1     = new ViewUsers();

            //check if keywords have value or not
            if (keyword != null)
            {
                //show user based based on keywords

                DataTable dt = vu1.Search(keyword);
                dataGridView1.DataSource = dt;
            }
            else
            {
                //show all user from database
                DataTable dt = vu1.Select_user();
                dataGridView1.DataSource = dt;
            }
        }
 private void btn_viewuser_Click(object sender, EventArgs e)
 {
     user.ViewUsers vUser = new user.ViewUsers();
     vUser.Show();
 }