Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //SEARCH
            srch = searchBox.Text;
            key  = key_txtBox.Text;

            nims   = textBox1;
            names  = textBox2;
            kls    = textBox3;
            kompen = textBox4;

            //Biar pas awalan di buka text boxnya kosong dulu
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";

            if (srch == "Nama") //Karena List nama itu ada di dlm combo box makannya dimasukin if
            {
                LinearSearch obj = new LinearSearch();
                obj.SearchNama3(key, nims, names, kls, kompen, getData());
            }
            if (srch == "Nim")
            {
                LinearSearch NE = new LinearSearch();
                NE.SearchNIM(key, nims, names, kls, kompen, getData());
            }
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
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;
        }