Esempio n. 1
0
        private void myButtonSearch1_Click(object sender, EventArgs e)
        {
            var userApp = new myUserAplication();

            if (myCheckBoxJobTitle1.Checked == false && myCheckBoxFirstName1.Checked == false)
            {
                myDataGridView1.Enabled         = true;
                this.myDataGridView1.DataSource = userApp.Method_APP_SelectAll();
                this.myDataGridView1.ClearSelection();
                Method_UI_SetCountSelecRowUser(userApp.Method_APP_SelectAll().Count);
            }
            else if (myCheckBoxJobTitle1.Checked == true && myCheckBoxFirstName1.Checked == false)
            {
                myDataGridView1.Enabled         = true;
                this.myDataGridView1.DataSource = userApp.Method_APP_SelectByJobTitle(myComboJobTitle1.SelectedItem.ToString());
                this.myDataGridView1.ClearSelection();
                Method_UI_SetCountSelecRowUser(userApp.Method_APP_SelectByJobTitle(myComboJobTitle1.SelectedItem.ToString()).Count);
            }
            else if (myCheckBoxJobTitle1.Checked == false && myCheckBoxFirstName1.Checked == true)
            {
                myDataGridView1.Enabled         = true;
                this.myDataGridView1.DataSource = userApp.Method_APP_SelectByName(myTxtBoxFirstName1.Text.ToString());
                this.myDataGridView1.ClearSelection();
                Method_UI_SetCountSelecRowUser(userApp.Method_APP_SelectByName(myTxtBoxFirstName1.Text.ToString()).Count);
            }
            else if (myCheckBoxJobTitle1.Checked == true && myCheckBoxFirstName1.Checked == true)
            {
                myDataGridView1.Enabled         = true;
                this.myDataGridView1.DataSource = userApp.Method_APP_SelectByNameAndJob(myTxtBoxFirstName1.Text.ToString(), myComboJobTitle1.SelectedItem.ToString());
                this.myDataGridView1.ClearSelection();
                Method_UI_SetCountSelecRowUser(userApp.Method_APP_SelectByNameAndJob(myTxtBoxFirstName1.Text.ToString(), myComboJobTitle1.SelectedItem.ToString()).Count);
            }
        }
Esempio n. 2
0
        private void Method_UI_RefreshGridUser()
        {
            var userApp = new myUserAplication();

            myDataGridView1.Enabled         = true;
            this.myDataGridView1.DataSource = userApp.Method_APP_SelectAll();
            this.myDataGridView1.ClearSelection();
            Method_UI_SetCountSelecRowUser(userApp.Method_APP_SelectAll().Count);
        }