コード例 #1
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            table.Clear();
            string src = cmbSearch.Text;
            string key = SearchBox.Text;

            if (src == "Nama")
            {
                LinearSearch lsc = new LinearSearch();
                lsc.SearchNama(key, table, getData());
            }

            else if (src == "Kelas")
            {
                LinearSearch lsc = new LinearSearch();
                lsc.SearchKelas(key, table, getData());
            }

            data_mahasiswa.DataSource = table;
        }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            obj.Clear();
            string src = cbKelas.Text;
            string key = textBox1.Text;

            if (src == "Nama")
            {
                LinearSearch lsc = new LinearSearch();
                lsc.SearchNama(key, obj, getData());
            }

            else if (src == "Kelas")
            {
                LinearSearch lsc = new LinearSearch();
                lsc.SearchKelas(key, obj, getData());
            }



            dataGridView1.DataSource = obj;
        }