Create a checkbox with the following parameter:
private void chkBox_CheckedChanged(object sender, EventArgs e)
{
MySqlDataAdapter sda = new MySqlDataAdapter();
MySqlConnection Con = new MySqlConnection("server=localhost;user id=root; password = 12345; persistsecurityinfo=True;database=YOURDB");
MySqlCommand Command = new MySqlCommand("SELECT COLUMN from TABLE WHERE COLUMN;", Con);
DataTable dt = new DataTable();
sda.SelectCommand = Command;
sda.Fill(dt);
DgvGerirEmp.DataSource = dt;
if (chkBox.Checked == true)
{
MySqlCommand Command = new MySqlCommand("SELECT COLUMN from TABLE WHERE COLUMN <=1500;", Con);
}
else
{
MySqlCommand Command = new MySqlCommand("SELECT COLUMN from TABLE WHERE COLUMN >=1499;", Con);
GerirEmpArq.Show();
GerirEmpDesArq.Hide();
}
}
I didn't tested it but it should work fine, i've used it myself on some projects, use it as you wish.