コード例 #1
0
        private void button11_Click(object sender, EventArgs e)
        {
            d1 = new department();
            DataTable tbl = new DataTable();

            tbl = d1.ShowTable("SELECT * FROM department");
            dataGridView1.DataSource = tbl;
        }
コード例 #2
0
 private void button9_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text != "")
     {
         d1 = new department();
         DataTable tbl = new DataTable();
         tbl = d1.ShowTable("SELECT * FROM department WHERE ID = '" + comboBox1.Text + "'");
         dataGridView1.DataSource = tbl;
         dataGridView1.DataSource = tbl;
     }
     else
     {
         MessageBox.Show("Please Select An Id");
     }
 }
コード例 #3
0
 private void Managedepartment_Load(object sender, EventArgs e)
 {
     d1 = new department();
     d1.select(comboBox1, comboBox2, comboBox3);
 }