コード例 #1
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.SelectedIndex == 0)
     {
         updateButton.Visible = true;
     }
     else
     {
         updateButton.Visible = false;
     }
     if (comboBox1.SelectedIndex == 0)
     {
         DataSet ds = controller.getEmployees();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 1)
     {
         DataSet ds = controller.getQualafications();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 2)
     {
         DataSet ds = controller.getEmployeeRelatives();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 3)
     {
         DataSet ds = controller.getEmployeeAbscence();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 4)
     {
         DataSet ds = controller.getEmployeeAbscence2004();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 5)
     {
         DataSet ds = controller.getMostSick();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 6)
     {
         DataSet ds = controller.getColumns();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 7)
     {
         DataSet ds = controller.getKeys();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 8)
     {
         DataSet ds = controller.getIndexes();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 9)
     {
         DataSet ds = controller.getTableConstraints();
         dataGridView1.DataSource = ds.Tables[0];
     }
     else if (comboBox1.SelectedIndex == 10)
     {
         DataSet ds = controller.getTables();
         dataGridView1.DataSource = ds.Tables[0];
     }
 }